To save money for the production, director Michael Bay reduced his usual fee by 30 percent. He planned an eighty-three day shooting schedule, maintaining the required pace by doing more camera set-ups per day than usual. Bay chose to shoot the film in the United States instead of Australia or Canada, allowing him to work with a crew he was familiar with, and who understood his work ethic. A pre-shoot took place on April 19, 2006, and principal photography began on April 22 at Holloman Air Force Base, which stood in for Qatar. To film the Scorponok sequence at White Sands Missile Range, a sweep was performed to remove unexploded ordnance before building of a village set could begin; ironically, the village would be blown up. The scene was broken down for the pilots flying the AWACS aircraft, who improvised dialogue as if it were an actual battle.
The company also shot at the Hoover Dam and the Pentagon, the first time since the September 11, 2001 attacks that film crews had been allowed at these locations. The external Hoover Dam scenes were shot before tourists arrived daily at 10:00 a.m., with shooting moving inside for the remainder of the day. Production in California was based at Hughes Aircraft at Playa Vista, where the hangar in which Megatron is imprisoned was built. Six weekends were spent in Los Angeles, California shooting the climactic battle, with some elements being shot on the Universal Studios backlot and at Detroit's Michigan Central Station. The crew was allowed to shoot at Griffith Observatory, which was still closed for renovations begun in 2002. Filming wrapped on October 4, 2006.
The film has been found to re-use footage from Bay's previous film Pearl Harbor.