Empire of the Sun was filmed at Elstree Studios in the United Kingdom, and on location in Shanghai and Spain. Principal photography began on 1 March 1987, and lasted for 16 weeks. The filmmakers searched across Asia in an attempt to find locations that resembled 1941 Shanghai.