The 37-year-old was hoisted onto his teammates' shoulders for a lap of honour after the tourists, who resumed their second innings at 127-7 chasing a target of 271, were shot out for 165 before lunch on the fifth day.
The former Test captain, who had retired from Twenty20 internationals after Sri Lanka's title-winning campaign in the World T20 in April, will now play only one-day cricket heading into next year's World Cup.
"I don't know what to say, but I promise I won't cry," Jayawardene said at the presentation ceremony as firecrackers went off in the stands.
"I love you all. Thank you so much for the support all these years. I still have a little bit left and I promise I'll give it my all for the World Cup. Thanks also to my team-mates. It's been great to play for Sri Lanka for so many years. I have always worn this cap with pride and passion."
Also Read
Jayawardene finished with 11,814 runs in 149 Tests with 34 centuries, but his average dropped from 50.02 to 49.84 after making four and 54 in his final Test at the SSC.
Pakistan captain Misbah-ul Haq described Jayawardene as a legend whose absence in the Test arena will be felt by all.
"Not only Sri Lankans, fans all over the world are going to miss him," Misbah said. "I really wish him best of luck in life. He is really a legend.