The 53-year-old took charge of the first team in March after Gary Neville was sacked following a dismal run of results in La Liga.
Three wins in a row against Sevilla, Barcelona and Eibar saw Valencia pull away from the relegation places, and Ayestaran emerged as a popular choice to take the role on a full-time basis among supporters despite Valencia ending the season with no wins in their last four.
Former coaches Quique Sanchez Flores and Rafael Benitez were linked with the position, but the club have confirmed that Ayesteran has agreed a contract for the next two seasons.
"Valencia wish to announce that Pako Ayestaran has been named coach of until June 30, 2018," a club statement read.
Ayestaran will hold a media conference on Tuesday at Mestalla.