On the outbreak of the Spanish Civil War López founded the newspaper, Fraga Social. In September 1936, President Manuel Azaña appointed the left-wing socialist, Francisco Largo Caballero as prime minister. Largo Caballero brought into his government four anarchists, López (Commerce), Juan Garcia Oliver (Justice), Federica Montseny (Health) and Juan Peiró (Industry).
In February 1937, he drew up a decree which defined and regularized the operation of factories, businesses and commerce. This helped to reassure the owners of enterprizes that had been nationalized and collectivised. He became the first anarchist minister to visit a foreign country when he visited Paris for meetings with the French government.
López was forced to flee from Spain when General Francisco Franco and the Nationalist Army took control of the country in March 1939. He went to England where he remained until 1954. He then moved to Mexico where he stayed until returning to Spain in 1966.
Juan López Sanchez died in Madrid in August 1972.