The deal would create a company with $18 billion in annual sales and more than 13,000 stores, more locations than any other North American discounter, Dollar Tree said Monday.
The sale comes in the wake of troubles for Family Dollar. The chain, based in Matthews, N.C., announced in April that it was closing 370 underperforming stores after its profit plummeted more than 30% in the second quarter.
Last month, activist investor Carl C. Icahn disclosed a 9% stake in Family Dollar and urged the firm to put itself up for sale.
The cash and stock deal is valued at $74.50 per share, a nearly 23% premium over Family Dollar's closing price Friday.
Shares of Family Dollar were up $13.78, or 23%, at $74.44 about midway through Monday's stock trading session. Shares of Dollar Tree rose $1.89, or 3.5%, to $56.11.
Dollar Tree, based in Chesapeake, Va., said it would keep the Family Dollar brand. The transaction has been approved by the boards of both companies and is expected to close early next year.