Under the former Real Madrid and Spain defender, who had little previous coaching experience, 2010 winners Spain lost on penalties to host nation Russia in the last 16.
"After travelling many kilometres together, the Spanish Football Federation and Fernando Hierro have put an end to their relationship," the federation said.
Brazil World Cup exit 'the saddest moment of my career' - Neymar
Hierro declined to return to his previous job as the federation's technical director and "will undertake new professional challenges", the federation wrote.
Spain were tipped among the favourites until Lopetegui caused chaos by announcing he would become Real Madrid's new coach after the World Cup.
The federation, fearing a split between players from Barcelona and Real, sacked Lopetegui two days before Spain's opening game against Portugal.
He described it as the saddest day of his life since the death of his mother.
Andres Iniesta, the former Barcelona great who scored the winning goal in the 2010 World Cup final, retired from the international team after the defeat to Russia.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ