Combined, the two firms have more than 5,500 hotels with 1.1 million rooms and $2.7bn in revenue.
The two boards have "unanimously agreed" to the deal, under which Marriott will buy Starwood.
The tie-up will see them overtake the UK's Intercontinental Hotels, which has just under 5,000 hotels.
J.W. Marriott, Jr, chairman of the Maryland-based company, said: "We have competed with Starwood for decades and we have also admired them."
Marriott chief executive Arne Sorenson, who will head the new group, said the two firms hoped to become "the world's favourite travel company".
The deal will combine Marriott's 19 brands, including Ritz-Carlton and Fairfield Inn, with Starwood's Westin, W and St. Regis chains.
Marriott will pay $11.9bn in stock and the rest in cash, and hopes to have the acquisition completed by mid-2016.
Starwood, which opened a review into its strategy in April, had also been linked to deals with Intercontinental and Hyatt Hotels.