The 19-year-old was not expected to finish in the medal positions, with teammate Louis Smith touted as Britain's biggest hope.
Smith went on to win silver, while Whitlock surprised himself by clinching the bronze.
"I can't believe it," Whitlock said after collecting his medal. "To come home from my home Olympics, my first Olympics as well, with two of these bronze medals is unbelievable.
"To get through a clean routine in that atmosphere with the crowd cheering so loud, it's crazy. It felt good as I was going round but I had to keep it going and I'm so happy with that.
"I came into the Olympic Games just wanting to get a final for myself personally and for the team, to do as well as I can. I can't believe it, I've exceeded it."
Whitlock's other bronze medal was also unexpected, coming in the team event.