The 73-year-old actor, who plays the wizard Gandalf in the Peter Jackson-directed film, said that he became upset while filming a sequence on green screen with only visual aids to act against, reported Digital Spy online.
"In order to shoot the dwarves and a large Gandalf, we couldn't be in the same set. All I had for company was 13 photographs of the dwarves on top of stands with little lights - whoever's talking flashes up," McKellen said.
"Pretending you're with 13 other people when you're on your own, it stretches your technical ability to the absolute limits. I cried, actually. I cried. Then I said out loud, 'This is not why I became an actor'. Unfortunately the microphone was on and the whole studio heard," he added.
The first movie in the three-part Hobbit series, "The Hobbit: An Unexpected Journey", is due for release on December 13 in the UK and US.