The 17-year-old, who was making his first appearance at a grand slam tournament and received a good luck message from Judy Murray, went down 6-4, 6-3 to wildcard entrant Max Batyutenko of Kazakhstan.
He also exited in the first round of the boys´ doubles alongside British partner Louis Bowden. They lost 6-3, 7-6 to the American-Russian partnership of Leanid Boika and Yaroslav Demin.
Rankin, who trains at Stirling University as part of Tennis Scotlands National Player Programme, has lots to look forward to as he enters his final 12 months as a junior.
The former Merchiston Castle School pupil is 68th in the ITF world rankings following a productive 2021 on the international circuit in both singles and doubles.
Defending champions Alfie Hewett and Gordon Reid of Glasgow secured their place in Wednesday’s wheelchair men’s doubles finals.
It will be their third successive men’s doubles final at Melbourne Park, after the 13-time grand slam winners fought back from 4-2 and 5-3 down in the opening set of their semi-final against Tom Egberink of the Netherlands and Australian Ben Weekes to close out a 7-5, 6-2 victory.
In the women’s singles, perseverance finally paid off for an emotional Alize Cornet as she reached her first grand slam quarter-final at the 63rd attempt.
The Frenchwoman, who celebrated her 32nd birthday on Saturday, dropped to the court in tears at the end of a gruelling 6-4, 3-6, 6-4 victory over Simona Halep in sweltering conditions at the Australian Open.
Cornet has played in every grand slam tournament for the last 15 years and this was her sixth trip to the fourth round but she had never previously managed to go further.
"It feels amazing," said Cornet, who revealed after beating third seed Garbine Muguruza in the second round that this could be her final year on tour.
"The battle that we had with this heat. After 30 minutes we were both dying on the court. We kept going for two and a half hours with all our heart.”
In the last eight she will face 2019 semi-finalist Danielle Collins, who also came through a lengthy battle, beating 19th seed Elise Mertens 4-6, 6-4, 6-4.
In the men’s singles, Daniil Medvedev overcame Maxime Cressy and his own frustration to reach the quarter-finals.
American Cressy plays a throwback serve-and-volley game and has had an excellent start to the season. Medvedev's emotions threatened to boil over after he lost the third set but he stayed just cool enough to win 6-2 7-6 (4) 6-7 (4) 7-5.
"It was not easy," said the second seed. "Hell of a match. The fourth set was crazy."
In the last eight he will face ninth seed Felix Auger-Aliassime, who battled past Marin Cilic in four sets to reach the quarter-finals for a third successive slam.
Twenty-year-old Jannik Sinner is another young player making rapid strides towards the top and the Italian reached his second grand slam quarter-final with a 7-6, 6-3, 6-4 victory over Australia's Alex De Minaur.