It's a secret he's been carrying around for 17 years. The Mad King intended to blow up all of King's Landing with wildfire, and Jaime killed him – and his pyromancer – in order to prevent it. In doing so, he sacrifices his honour and his reputation.
This is one of the best scenes in the whole show – in any show, in my opinion – and it marks a huge turning point. Like Brienne, we see Jaime clearly for the first time and realise he's much more complex – and yes, even good – than he initially appeared. The scene also makes us rethink everything we've previously been told. It casts Ned and his judgement in a new, and not entirely positive, light.
This is Game of Thrones at its best, allowing its characters (both the "heroes" and "villains") to exist in three-dimensional shades of grey rather than two-dimensional black and white.