The accident at the Torrejon military base east of the city occurred during takeoff, a Defence Ministry spokesman said.
Images in Spanish media showed plumes of smoke rising from the base's runway.
"As a result of the accident, which happened during takeoff manoeuvre, the plane's pilot has died," the ministry said on Twitter.
Rescue workers are seen at the crash site of a military F18 fighter plane which crashed at Torrejon airbase in Torrejon de Ardoz, outside Madrid, Spain
A military F18 fighter plane crashed on the outskirts of Madrid on Tuesday killing its pilot, the Spanish Defence Ministry said.