French winger Biabiany was set to join Milan but the transfer collapsed on Monday after defender Cristiano Zaccardo turned down a move to Parma as part of the swap deal.
Milan moved quickly to acquire the 25-year-old Bonaventura, who has signed a five-year contract at San Siro.
"Once the deal with Biabiany collapsed, we had to act fast and we thought of Bonaventura," AC Milan vice-president Adriano Galliani told acmilan.com.
"Zaccardo turned down the move and we thought we still needed to sign a player.
"Bonaventura is a great player and a wonderful person. He is still young and has great quality."
Bonaventura scored five goals in 31 Serie A appearances for Atalanta last season.
He made his Italy debut in a 4-0 victory over San Marino in May 2013.