The series victory came shortly before an announcement that Australia coach Tim Nielsen was stepping down after four and a-half years in the post rather than reapplying for his job .
On Nielsen's last day in charge, Clarke and Michael Hussey put together a record fifth-wicket partnership of 176 to inflict a first home defeat in a test series on Sri Lanka since they lost to Pakistan in 2006.
The visitors, who had trailed Sri Lanka after the first innings by 157 runs, were dismissed for 488 in their second on the final day. Sri Lanka were left needing 332 for victory off 17 overs and had made 7-0 in two overs when the match ended.
"All the boys are pretty stoked. It's been a fantastic tour," Clarke told reporters.
"Both the one-day series and test series have certainly gone to plan ... We got the two major results, we won both series. I am really proud how the boys have played and personally it was nice to finally get to those three-figures."
Clarke and Hussey came together after Phil Hughes (126) was dismissed in the sixth over of the final day, and the experienced duo recorded Australia's highest partnership for the fifth wicket against Sri Lanka.
During his 178-ball stay at the wicket, Clarke escaped two stumping chances to wicketkeeper Prasanna Jayawardene on scores of 14 and 71 and also survived a run out attempt on 13 when Kumar Sangakkara failed to hit the stumps from mid-off.
Clarke, who hit 14 fours and three sixes, and former Sri Lanka captain Sangakkara were later involved in an exchange of words where the umpires had to intervene.
Soon afterwards Clarke lost his concentration and holed out to Tharanga Paranavitana at mid-on to give Herath his sixth five-wicket haul in an innings.
"Throughout my career there's been plenty of ups and downs but of late, in test cricket there's probably been more downs than ups," Clarke said.
"I had a horrible Ashes series and to be able to help this team win this series by making some runs today is very special."
Hussey, the leading run-scorer in the series with 463, missed out on a second century in the match when he was dismissed for 93.
The left-hander top-edged a sweep of Tillakaratne Dilshan to square leg where Chanaka Welegedera held on to a diving catch. Hussey hit 11 fours and a six in his 138-ball stay.
Dilshan said Hussey had made the difference in the series where Australia won the first test at Galle by 125 runs and drew the second at Pallakele.
"He batted at Galle with the tailenders and got 95 and changed the complexion of the match," Dilshan said.
"He did the same at Pallakele and got a hundred. Here in the third test he got another hundred. He is the main guy in their batting line up. They are very strong with him in the middle and they bat around him."
Herath continued to chip away at the Australian batting to end with career best figures of seven for 157.
When he trapped Peter Siddle for 26, Herath became only the fourth Sri Lankan bowler to capture 100 test wickets after Muttiah Muralitharan, Chaminda Vaas and Lasith Malinga.
The hosts captured the solitary wicket of centurion Hughes in the morning session when the left-handed opener went for a sweep against Herath but top-edged it to Lahiru Thirimanne at deep square leg.
Hughes added only four runs to his overnight score. He faced 220 balls and had 16 fours and a six during his innings.