"From military aid to technical and training assistance, we will stand with you to ensure more innocents are not slaughtered and that the threat does not metastasize further," the speaker said.
Boehner alluded to the years, dollars and American lives lost that the United States has invested in Iraq, describing the "painful sacrifices" to help the country. He also acknowledged the threat from the Islamic militants.
"ISIL is at war with both of our countries," Boehner wrote. "ISIL is our common enemy and must be defeated so we and our families, children and grandchildren may live in peace."
The exchange of letters comes as the House weighs President Barack Obama's request for authority to train and equip moderate Syrian rebels to fight the Islamic militants in Syria. Boehner and several top Republicans have signaled their support for that request, with a vote expected in Congress next week.
In his letter, al-Abadi expressed condolences for the death of two American journalists. He also acknowledged the upcoming November elections.
"I know that the plight of my country might be an issue during the campaign," the prime minister wrote. "I can assure you that the investment America made in Iraq was worth the price."