The deal will see it move into direct competition with Airbnb.
The boards of directors of both companies unanimously approved the transaction, which remains subject to certain conditions. The companies expect the transaction to close in the first quarter of 2016.
"We have long had our eyes on the fast growing ~$100 billion alternative accommodations space and have been building on our partnership with HomeAway, a global leader in vacation rentals, for two years.
"Bringing HomeAway into the Expedia, Inc. family and adding its leading brands to our portfolio of the most trusted brands in travel is a logical next step," said Dara Khosrowshahi, chief executive of Expedia, Inc.
Analysts at Euromonitor suggested that the deal could see Expedia heading in a new direction.
Amanda Bourlier, research analyst at Euromonitor International, said: “Expedia has been on an accelerating buying spree this year, acquiring Travelocity for US$280 million, Orbitz for US$1.6 billion, and now HomeAway for US$3.9 billion.
"The industry had long speculated that HomeAway would be acquired, with rumors suggesting Priceline, TripAdvisor, Google, and Expedia as a potential buyer at various times.
"While Expedia has generally prioritized hotels over vacation rentals in both search results and strategy despite its prior partnership with HomeAway, the acquisition suggests Expedia is prepared to place more emphasis on rentals than before."