The 55-year-old aeronautical engineer became the first Spaniard to travel to space in 1998 when he took part in a nine-day mission aboard the space shuttle Discovery after training in Russia and the United States.
He returned to space in 2003 as part of an International Space Station (ISS) mission.
As science minister, he will also be in charge of promoting innovation and overseeing Spain's universities.
READ MORE: This is Spain's new cabinet
Duque graduated from Madrid's Polytechnic University in 1986 and was selected six years later to take part in a European Space Agency programme for future astronauts.
In recent years, he became a staunch critic of practices such as homeopathy and denounced the steep cuts to scientific research put in place by the conservative government of Mariano Rajoy, which was ousted last week.
“In the middle of a crisis, society must act wisely to avoid mortgaging its future,” Duque wrote in an opinion piece published in top-selling newspaper El Pais.
Duque is not the first former astronaut to become a minister in a national government. Canadian premier Justin Trudeau named ex-astronaut Marc Garneau as his transport minister when he came to power in 2015.