He announced his retirement before the first Test match against in Galle against India, he was on 792 wickets. Then, he dismissed master blaster Sachin Tendulkar to record number 793.
However, rain washed out day 2 and it seemed that 800 might well be out of Murali's reach.
The script was already written though, as India collapsed on Day 4 and ended up losing 12 wickets, with Murali accounting for five of them.
Murali took five wickets in the first innings, following it up with three in the second. Pragyan Ojha was wicket number 800, as he edged one to slip where Mahela Jayawardene took a simple catch, the all too familiar Muralitharan and Jayawardene combo got together for a record 77th time.
#OnThisDay in 2010, the legendary Muttiah Muralitharan signed off from Test cricket.— ICC (@ICC) July 22, 2018
He claimed his record 800th wicket with his final ball by dismissing Pragyan Ohja in a 10 wicket win for Sri Lanka against India in Galle. pic.twitter.com/rkbGL2p9cU
That's how Murali ended his Test career with a wicket off the final ball, similar to another great, the Kiwi all-rounder Richard Hadlee.
He also completed 800 dismissals, a record which would take some undoing if any is to ever scale it.
Murali still remains the highest wicket-taker, with Shane Warne in second spot with 708 scalps. Jimmy Anderson and Rangana Herath are among the active cricketers who will be looking to challenge Murali for the record but with age not on their side, it seems Ravichandran Ashwin is the only active cricketer who has any chance of coming anywhere near the record, he has 275 wickets in 49 matches.