The 17-year-old qualifier, the youngest player in the men's draw, battled past Germany's Oscar Otte 6-2, 6-4, 6-7 (2/7), 7-5 in nearly three hours to progress.
After saving two break points in the opening set, he did not face another as he sealed the win on his third match point at Melbourne Park.
His reward is a tough second-round encounter with either American 16th seed Frances Tiafoe or another German, Daniel Altmaier.
"I think it's huge for Chinese men's tennis. You know, we have had really good players from the women's side but not really big names in the men's," said Shang, who also goes by the name "Jerry".
"So I think we are very lucky that I'm part of it and I'm very lucky that I'm part of this team. Hopefully we can do something big in the future."
In addition to the significance of the result for China, Shang also achieved several personal milestones -- aside from notching his first major win, he also earned his first tour-level win in four tries.
"I think overall this whole week was different for me, playing my first Slam, every day I was pretty nervous getting on the court," he said.
"But at the same time, it's one of the best moments I have had so far in my career, so I'm just very excited to be on court, and everything is a learning process for me."
Shang is leading a historic Chinese charge in Melbourne with three male Chinese players competing at any Grand Slam main draw since the Open era began in 1968.
He is joined by Zhang Zhizhen and Wu Yibing.
Seven Chinese also entered the women's singles draw, led by the veteran Zhang Shuai, who is ranked 22 in the world.
The retired Li Na remains China's best-ever player after she won the French Open in 2011 and Australian Open three years later.
Asked why Chinese women had traditionally always done better than men, Shang said: "It's a complicated thing.
"I think I'm not quite sure how to answer that, but I think physically it's a big step for us in men's tennis.
"But I think we're on the right track right now. Hopefully we can do a better job in the Slams, in the three-out-of-five sets, and hopefully that can happen in the future."
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)