The six-time world champion last won the title in 2002/03, when Zhengyi was just two years old.
But despite his lack of experience in finals, 21-year-old Zhengyi showed experience past his years to hold off O'Sullivan and claim the title with a 10-9 victory.
A tense opening saw the duo race to 2-2, but Fan quickly settled into the game and breaks of 63 and 78 gave him a 4-2 lead.
O'Sullivan rallied to draw level at 4-4 but twin centuries from Zhengyi - 135 and 100 - restored his two-frame advantage.
Finding himself behind in the match again, O'Sullivan relied on his experience to comeback to 6-6, but an unrelenting Zhengyi pounced on mistakes to lead 8-6.
A dazzling 107 by the Englishman helped him claw himself back into contention and eventually set up a decider, but Zhengyi managed a break of 92 in the final frame to win his first ranking title.
Following the match, O'Sullivan paid respect to his opponent, labelling him a "future world champion".
"He's a fantastic player, brilliant. He was the better player all day. I tried to hang on and make a game of it - which I did in the end - but he deserved his victory.
"It's great for snooker and it was a pleasure to watch and a pleasure to play a future world champion."
Zhengyi, who entered the tournament as the world No.80, was equally as classy post-match, describing O'Sullivan as his "idol".
"Playing against Ronnie in the final already made my dream come true because Ronnie is every Chinese player's idol.
"Me, Xintong, Bingtao, because Ronnie is always so generous to the Chinese players and help them all the time.
"So happy to play Ronnie and learn from him."
Zhengyi became the fifth player from mainland China to win a ranking title, joining Bingtao, Xintong, Ding Junhui and Liang Wenbo.