WASHINGTON—Congressional leaders early Wednesday unveiled a sweeping deal on spending and tax legislation that would avoid a government shutdown and make major changes to energy policy and the 2010 health law.

The $1.15 trillion spending bill to fund fiscal year 2016 was completed and released around 1:30 a.m. on Wednesday, following weeks of negotiations on Capitol Hill. Late Tuesday night, lawmakers also reached a deal on legislation that would revive and extend dozens of lapsed and expiring tax breaks. As part of the year-end...