Liton was batting on 135 and Mushfiqur, who scored 105 in the first test, was on 115 after sharing a record 253 runs in an unbroken sixth-wicket stand.
They made the highest partnership for the sixth wicket or lower after losing the first five wickets for 25 runs or less, breaking the record set by Pakistan duo Wallis Mathias and Shujauddin against West Indies in 1959.
It was also Bangladesh’s highest sixth-wicket partnership, eclipsing the 191 by Mohammad Ashraful and Mushfiqur Rahim against Sri Lanka in 2007.
After a sensational batting collapse, they kept Bangladesh unscathed throughout the day.
The only chance Sri Lanka could create came when Liton on 47 offered a catch at backward square leg, which Kusal Mendis’ substitute Kamindu Mendia failed to hold on to.
Mendis was taken to a hospital earlier because of chest pains.
Liton then hit Asitha Fernando for a boundary through the same region to raise his fifty off 96 balls. He then needed just 53 balls to complete his next fifty to reach his third century off 149 balls.
Mushfiqur, who became the first Bangladeshi batter to reach 5,000 runs last week, was more restrained.
He brought up his fifty off 112 balls, also through a boundary from left-arm spinner Praveen Jaywawickrama’s delivery.
Unlike Liton, his innings was completely chanceless and he raised his ninth century off 218 balls with a single from a delivery by Ramesh Mendis.
But it was a terrible start for Bangladesh, which opted to bat first after captain Mominul Haque won the toss.
Pacer Kasun Rajitha took a wicket with the second ball of the match and two in the seventh over to start a session of dominance for Sri Lanka.
Rajitha, who played part of the drawn first test as a concussion substitute, returned figures of 3-43 and Fernando claimed 2-80.
Rajitha and Fernando removed openers Mahmudul Hasan and Tamim Iqbal for ducks as Bangladesh slumped to 6-2 in the second over.
Bangladesh captain Mominul Haque extended his lean streak to six consecutive single-digit scores when he was caught behind off Fernando for 9 in the sixth over.
And when Rajitha took wickets with consecutive deliveries in the next over, beating Najmul Hossain (8) for pace and then trapping Shakib Al Hasan lbw for a duck, Bangladesh slumped to 24-5.