Gomes, 31, was greeted by his family members, including his mother, at the Logan International Airport.
The Carter Centre, the former president's Atlanta-based foundation, said in a statement that "at the request of President Carter and for humanitarian purposes, Gomes was granted amnesty by the Chairman of the National Defence Commission Kim Jong-Il."
"I am just joyful and grateful that my son is home," Gomes's mother Jacqueline McCarthy said.
"I thank President Carter for making sure he is home safely. I thank God for everything everyone has done for us," she said.
Gomes, who used to teach English in South Korea, crossed into North Korea earlier this year to protest against his friend's arrest, but got himself booked for illegally entering into the country. Arrested on January 25, Gomes was sentenced in April to eight years of hard labour and $700,000 fine, his friends said.
Gomes felt "very upset when a friend, Korean-American Robert Park, was arrested after crossing into North Korea on December 25 to protest human rights abuses there," they said.
His family also issued a statement thanking the North Korean government for "caring for Aijalon during his darkest days, then agreeing to release him on humanitarian grounds."
Thanking the US State Department, Gomes' family said they are grateful for the "thoughts, prayers and good wishes of so many Americans who shared our pain and can now share our joy."
The State Department also welcomed the news of Gomes's release in a statement that also said Carter was not representing the federal government, which has no diplomatic ties with Pyongyang. The former US President travelled to North Korea at the invitation of that country, the statement added.
Last year, former president Bill Clinton had gained the release of two American journalists who were accused of crossing illegally into the country.
Image: Former US President Jimmy Carter looks on as Aijalon Mahli Gomes is reunited with his family in Boston | Photograph: Adam Hunger/Reuters
US ex-president Carter gets American hostage released from North Korea
Bill Clinton gets journos released, leaves N Korea
Would an Indian leader go to a hostile nation to secure the release of its citizens?
Scribes' release: Obama thanks Clinton
Pakistan is still terror's playground