The pair, who have played Gandalf and Legolas respectively since 1999, will appear for the last time as the characters in There and Back Again, which is due to be released next year.
McKellen filmed his last ever scene on Friday (June 28) in the presence of director Peter Jackson, while Bloom wrapped filming on Saturday.
Jackson posted a picture of himself with McKellen on his Facebook page, with the caption: "Seconds ago we finished our last shot with Gandalf. The end of an incredible adventure that began in 1999. I'm feeling very sad right now."
A day later, the director posted a video of Bloom singing along to the 2007 viral video 'They Are Taking the Hobbits to Isengard'.
The new video has attracted over three million views in the last 24 hours.
Evangeline Lilly - who plays Tauriel in the trilogy - also finished work on the project last week.
The second instalment of the trilogy The Desolation of Smaug will be released on December 13, with There and Back Again following in December 2014.
Watch a trailer for The Desolation of Smaug below: