The Nittany Lions granted Ferguson his release last month, and he initially planned to play for Petrino at Western Kentucky. But those plans changed this week once Petrino returned to Louisville as successor to new Texas coach Charlie Strong.
"After he got the job at Louisville, he called me very shortly after that," Ferguson told ESPN.com. "So, yeah, I'm going out there to Louisville now."
Ferguson, Penn State's backup quarterback last season, plans to be on Louisville's campus by Sunday and start classes Monday.
"[Petrino] was the first to reach out to me when I got my release from Penn State," Ferguson said. "He said if he got the Louisville job, he still wanted to get me."
The rising junior, a junior college standout at College of the Sequoias in Visalia, Calif., will be required to sit out the 2014 season under NCAA transfer rules.
Ferguson played in five games last season, spending most of his time backing up Big Ten freshman of the year Christian Hackenberg. He finished his first season in the FBS by going 10-of-15 passing for 155 yards with one touchdown and no interceptions.
He cited playing time as the primary reason for his transfer.
Ferguson joins a Louisville team that finished 12-1 last season with quarterback Teddy Bridgewater, who recently declared for the NFL draft. Ferguson hopes to compete for the starting job once he's eligible.