Zagitova, 15, bidding to top a golden debut to her first senior season in which she has won every competition, including gold in Pyeongchang four weeks ago, trails the 31-year-old Italian by a slim 0.76 points.
Kostner — competing in her 14th world championships — skated faultlessly to Celine Dion’s ‘Ne me quitte pas’, hitting all her elements to score a new personal best 80.27 points to the delight of the home crowd.
Zagitova produced an elegant and solid performance to ‘Black Swan’, but looked shocked as she saw her score of 79.51 points appear — well below the world record 82.92 she achieved in South Korea.
“Honestly I was more nervous here than at the Olympic Games,” said the teenager from Moscow.
“It was very difficult to go back training after the Olympic. I took time to recover.
“I was very nervous because it is my first world championships. Every competition I’m learning something new.”
She added: “Today I felt somewhat tight in my body. I think it was nerves, but I was happy I was able to give a clean performance.
“There were a few little mistakes but nothing serious.”
On her home ice, Kostner was in reflective mood as she looked back to her first worlds back in Washington in 2003.
Kostner has six world medals — including the gold in 2012 — with her first a bronze in 2005. She also won Olympic bronze in Sochi 2014.
“In the middle of the programme there’s a passage where there is silence,” said Kostner, who finished fifth in Pyeongchang.
“I thought back to 15 years ago when I started skating internationally. Nobody in Italy followed figure skating.
“I feel so happy that people are sharing this passion with me.”
Japan’s Satoko Miyahara, a former world silver medallist, is sitting third with 74.36 going into Friday’s free skate.
“I thought I couldn’t get high points like today,” said Miyahara who finished off the podium in fourth in South Korea as she made her way back from injury in 2017. “On my first lutz-toe I got stuck so it wasn’t my best jump.”
Two-time reigning champion Evgenia Medvedeva is not defending her title after her silver behind Zagitova in South Korea as the Russian nurses a recurring foot injury.
Olympic bronze medallist Kaetlyn Osmond of Canada is fourth.
– Savchenko on track for record –
High life: Germany’s Aljona Savchenko is lifted by partner Bruno Massot
In pairs, Olympic champions Aljona Savchenko and Bruno Massot of Germany scored a personal best 82.98 for their short programme to lead going into Friday’s free skating final.
Russians Evgenia Tarasova and Vladimir Morozov (81.29) are second with France’s Vanessa James and Morgan Cipres (75.32) in third.
Savchenko — who won five world crowns with now-retired Robin Szolkowy — will be chasing a record when she bids for a first world gold with Massot.
Savchenko, who at 34 became the oldest female figure skating champion in Winter Olympic history last month, can tie Norwegian legend Sonja Henie for the female record of 11 world championships medals.
“It’s pretty cool to be able to skate our Olympic programme one last time,” said Massot.
“A lot of our family and friends couldn’t come to Korea so we’re doing the programme here for them.”
Massot’s mistakes in the short programme in South Korea had seen the pair trail in fourth before rallying to Olympic gold.
“I just promised myself I wouldn’t make the same mistake as the Olympics. We didn’t have much pressure, sometimes that’s the best way.”
The post-Olympic world championships are without many of the medallists from Pyeongchang including Japan’s Yuzuru Hanyu, the men’s champion who is out with injury.
The competition continues Thursday with the men’s short programme and the pairs free skating final.
Download our app and read this and other great stories on the move. Available for Android and iOS.