Barca are close to finalising a move for Manchester City's Eric Garcia, whose deal also expires this summer, but coach Ronald Koeman would also have supported the arrival of a more experienced defender like Alaba to ease the pressure on Gerard Pique.
President Joan Laporta looked to take advantage of his relationship with Alaba's agent, Pini Zahavi, to push through a deal but soon threw in the towel when he realised the Austria international already had a loose agreement with Madrid.
Barca's financial situation meant they were unable to stretch to the money being offered by Madrid. Sources also told ESPN that Alaba's relationship with midfielder Toni Kroos, a former teammate at Bayern, also helped tip the balance in Madrid's favour.
Madrid's interest in Alaba pre-dates Laporta's election as Barca president in March. In February, sources told ESPN the La Liga champions led the chase for the player, despite the interest from Premier League sides Chelsea and Liverpool.
Club captain Ramos is out of contract this summer and has still not agreed an extension, while Varane's deal is up in 2022 and Madrid could be forced to sell at the end of the season to avoid the risk of him leaving for free.
In February, sources told ESPN that Manchester United are monitoring Varane's situation and he refused to rule out anything when speaking in a news conference before Tuesday's Champions League semifinal against Chelsea.
"My future is clear," he said. "I am focused on the end of the season. We're in an intense moment of the campaign and we must be focused on what's in front of us. That's the most important thing."
ESPN correspondent Sam Marsden also contributed to this report.