The Yellow Submarine went down 2-0 at El Madrigal against the Segunda B outfit in the second leg of their fourth-round tie to crash out of the cup 3-1 on aggregate.
The defeat, coupled with the team's precarious position of 17th in the La Liga, prompted the club's board to dispense with Garrido's services.
Villarreal also endured a terrible Champions League campaign, becoming the first Spanish side to lose all six group stage matches.
A Villarreal statement read: "Juan Carlos Garrido has stopped being the coach of Villarreal's first team after the 2-0 cup defeat against Mirandes.
"The club thanks the Valencian tactician for all his efforts and dedication and wishes him luck in his future career.
"His successor has not yet been confirmed."
The 42-year-old, who had been at the club for 14 years in various capacities, took up the first-team reins in February 2010, initially until the end of that season.
Garrido guided the team to a seventh-place finish in La Liga in 2009/10, before clinching fourth spot and Champions League qualification in his first full campaign at the helm.
Villarreal also reached the semi-finals of the Europa League last season, where they were ousted by eventual winners Porto.