Chasing 86 for victory, Australia suffered a mini-collapse of their own, losing openers David Warner and Matt Renshaw as well as captain Steve Smith before reaching the 50-mark.
Glenn Maxwell made a breezy 25 not out, though, and sealed the victory with a six off Nasir Hossain to avenge Australia’s 20-run loss in the series opener in Dhaka.
“I thought we played some good cricket at times in this test match,” Smith said at the presentation ceremony.
“I’m proud of the way the boys got over the line here in the end to get the 1-1 draw.”
Earlier, Australia were not able to add to their overnight score as Lyon fell for a duck and were all out for 377, a first innings lead of 72.
Paceman Pat Cummins drew first blood for the tourists by dismissing opener Soumya Sarkar before Lyon’s three-wicket burst in the morning session unhinged the home side.
By the time they had erased the first innings deficit, Bangladesh had lost the top half of their batting lineup and the lack of a partnership down the order effectively condemned them to defeat.
Captain Mushfiqur Rahim topscored with 31, while Mominul Haque (29) and Sabbir Rahman (24) also got the starts but none of them were able to move on to the sort of big knock that might have set Australia a bigger test in the fourth innings.
Lyon claimed a third successive six-wicket haul to take his series tally to 22 wickets, the most by an Australian bowler in a two-test series.
“I thought Nathan Lyon was remarkable in that first innings. There wasn’t much in the pitch for him, and I think he got 22 wickets for the series, really good effort,” Smith said of his spin spearhead.
Lyon won the man-of-the-match award and shared the man-of-the-series honour with team mate Warner who scored back-to-back centuries in the series.
Despite the draw, Australia slipped to fifth place in the official test rankings.
Home captain Mushfiqur said his team should have batted better in the first innings when they scored 305.
“Credit goes to Australia. We knew they are a very strong team and will come at us harder,” the stumper-batsman said.
“If we could score 350-400, a target of 150-200 in the fourth innings, you never know. Our first innings cost us the game.”
(Reporting by Amlan Chakraborty in New Delhi; editing by Greg Stutchbury/Nick Mulvenney/Pritha Sarkar)