The pair played Gandalf and Merry Brandybuck in the hit fantasy movies.
They took part in the competition where there is £2 entry per person.
The top prize is a £50 bar tab with the team coming second to last bizarrely getting a bottle of house wine.
The Middle Earth actors did the quiz at The Grapes, in Limehouse, east London.
One fan of the film trilogy – based on the J. R. R. Tolkien books – said: “I joined a pub quiz.
“I was told that he occasionally comes there too.
“Then a few minutes before the quiz started, in walked Sir Ian McKellen with Dominic Monaghan.
“I casually blurted out ‘Hi, Sir’ and he said ‘Hello’.”
He added: “They won, with a huge margin.
“And my Lord of the Rings dreams came true.”
Sir Ian – co-owner of the traditional boozer – used to be quizmaster himself.
But “he joked he was ‘sacked’ for taking too long to devise the questions.
Speaking on the One Show earlier this year, the veteran actor, 84, said: “It’s been there since the 16th century and I don’t drop in too often.
“But I’m invariably there for the quiz on a Monday. I used to run the quizzes.”
Sir Ian – whose famous quotes as Gandalf included ‘You Shall not pass’ – added: “I used to actually be the quizmaster and I devised all the quiz questions. It took me a whole day in the week – 40 questions.
“I did this for a year and then my partner in the pub said: ‘We don’t need you anymore’.
“I was sacked from my own pub, doing a job for which I wasn’t paid.”
He added: “Anyway, they’ve got professionals in now and it’s much better.”