Arriving on the planet Foundation Prime in the centre of the Lego universe, Lord Vortech (Gary Oldman) and his robotic minion X-PO (Joel McHale) seek the twelve Foundation Elements, the cornerstones of time and space itself, in a bid to merge all the dimensions into one under Vortech's control.
These Elements, such as the Ruby Slippers, the One Ring, the Flux Capacitor, and Kryptonite, were scattered across the dimensions long ago, but gathered together at Foundation Prime's palace can unlock the power to control all of the dimensions. When X-PO voices his doubts of Vortech's evil plan (as it is too dangerous to harness the Elements safely), Vortech decides that he no longer needs him and banishes him to the planet Vorton.
Unfortunately for Vortech, his own body cannot handle too many more dimensional jumps, forcing him to open vortexes to the different dimensions and recruits their villains to help him search for the Elements while imprisoning the heroes pulled through them. These actions damage the boundaries between the dimensions, causing them to merge and characters to be displaced.