The 29-year-old from Dunfermline, who finished sixth at the 2019 World Championships, crossed the line in a winning time of 3:54.57.
Russian Paralympic Committee athlete Rabotnitskii and reigning Paralympic champion Michael Brannigan of the United States were expected to compete for top place on the podium in the T20 event.
Miller, who competes for Fife AC, produced the race of his life to claim his gold medal. He started the last lap in fifth place and was beginning, to drift away from the leading group but he put his foot down and climbed to second down the back straight.
He then sat patiently on the shoulder of Rabotnitski and overtook him on the last bend before sprinting home to stop the clock in 3:54.57.
"It went exactly the way I wanted. I timed it right and knew I could do it," Miller said.
"I gave it my all. I went for it and knew nobody was going to catch me. I could never really imagine I'd be a Paralympic gold medallist when I took up the sport, but I am today."
And the 29-year-old knows exactly how he celebrates when he gets home on Sunday.
“I am hoping to take a break now and have a lot of beer,” he said.
“It is my first Paralympic Games and what an experience, it is really hard going but the work I have done in the last 18 months has really paid off and helped me.”
There was no silver lining for Gordon Reid, however, who was a picture of devastation after coming out narrow second best alongside Alfie Hewett in the Paralympic final.
They played out a classic with Frenchmen Stephane Houdet and Nicolas Peifer but that was no consolation as they went down 5-7 6-0 6-7 (3-7) in three hours and 25 minutes.
It was the second successive Paralympic gold that Reid and Hewett have lost to the pair and their Golden Slam of major wheelchair tennis titles in 2021 is now off.
“There was a lot at stake, it's pretty much the only title we haven't won together and we both wanted it so badly,” said the Scot.
“There are no answers to the type of tennis we played in the second set, the only regret is that we didn't do it from the start.
“We went out playing our way, someone's got to be a winner and a loser and that was us today.
“We fought to the last point. It's not easy to take now but that’s all we can ask of ourselves.”
Hewett added: “Right now, we're so devastated and emotional. It will be a tough one take.”
Hewett and Reid beat Houdet and Peifer, who have a combined age of 80, in the last two Australian Open finals and the final of the 2020 US Open.
But their Tokyo face-off followed the same pattern as Rio 2016, as the French won the first set and then recovering from losing the second to take the gold medal.
“We played on their terms in the first set, we were defensive and weren't taking the ball on,” said Reid.
“We did a great job of turning that around at the start of the second set.
“We were unstoppable for nine games, but to do that for a long period of time takes a lot of energy, a lot of intensity, a lot of focus. It was just too much for us to maintain.”
The pair must now pick themselves up for what will be a surreal singles bronze medal match tomorrow, and the prospect of the US Open starting on September 9.
There was also disappointment etched in Stephen Clegg’s silver medal as the Edinburgh swimmer fell short of his aim of breaking the world record.
The 25-year-old was targeting his own all-time best in the 100m butterfly S12 but was denied gold at the touch by Azerbaijani Raman Salei by six-thousandths of a second.
"It's a bit heartbreaking,” said Clegg. “I know I was capable of much faster. If it was anywhere near by best, it would have been a gold.
"I was quite far out on my turn, there was big glide in, it's quite frustrating. I lost that race in the back end which is what I've been working on the most this year.
"I definitely want a gold medal in my career so there's no chance of retiring any time soon. I’ll go away from this and come back with a vengeance in Paris.”
There was heartache for Joanna Butterfield in the F1 club throw as she finished fourth, missing out on a medal by 31 centimetres.
45-year-old Richard Whitehead won 200m T61 silver on the penultimate night of action at the Olympic Stadium.
After sitting out three years with a major injury, Blairgowrie shooter Lesley Stewart finished 13th in Tokyo.
She scored 1133 to finish narrowly short of qualifying for the final of the 50m rifle three positions in the R8 lass.
Hamilton boccia player Stephen McGuire’s Games ended with a pool stage exit in the Bc4 pairs event, the same fate suffered by Prestwick’s Jamie and Scott McCowan in the BC3 discipline.
Elsewhere, Beth Munro took silver to mark taekwondo's debut at the Games and the 16th sport in which ParalympicsGB have won a medal.
Sainsbury’s is a proud supporter of ParalympicsGB and a champion of inclusive sport for all. Sainsbury’s commitment to helping customers to eat better has been at the heart of what we do since 1869. For more information on Sainsbury’s visit www.sainsburys.co.uk/ and https://paralympics.org.uk/