The seamer, who had previously performed the feat against India at Trent Bridge in 2011, struck with the final ball of his 12th over to have Kumar Sangakkara well caught for 79 by Ian Bell in the gully.
The first ball of his next over saw Broad have Dinesh Chadimal caught at first slip by England captain Alastair Cook for 45. Next ball saw Shaminda Eranga caught behind by wicketkeeper Matt Prior.
But because the hat-trick had been split across two overs neither Broad nor his England team-mates realised what he had achieved until the public address announcer informed the crowd.
"I had no idea!," Broad told Sky Sports. "I was listening to the guy that came on the tannoy there and I was thinking 'why is he mentioning the last ball of the over before?
', and it clicked that that might be a hat-trick.
"
Sri Lanka were eventually dismissed for 257 on the first day of the second Test on Friday after losing the toss.
Broad was only the fourth player in Test history to have twice taken a ha