The state department described the move as "an important" step to help Nigeria "root out violent extremism".
It means US regulatory agencies are instructed to block business and financial transactions with the groups.
Boko Haram wants to impose Islamic law in northern Nigeria, and has been blamed for thousands of deaths. Ansaru is seen as an off-shoot of Boko Haram.
It will become a crime under US law to provide material support to the group.
Boko Haram wants to impose Islamic law in northern Nigeria and has been blamed for thousands of deaths.
The group began its insurgency in 2009, and targets both the military and civilians, including schools, and frequently clashes with the Nigerian armed forces.
Boko Haram at a glance
Founded in 2002
Official Arabic name, Jama'atu Ahlis Sunna Lidda'awati wal-Jihad, means "People Committed to the Propagation of the Prophet's Teachings and Jihad"
Initially focused on opposing Western education
Nicknamed Boko Haram, a phrase in the local Hausa language meaning, "Western education is forbidden"
Launches military operations in 2009 to create an Islamic state across Nigeria
Founding leader Mohammed Yusuf killed in same year in police custody
Succeeded by Abubakar Shekau, who the military wrongly claimed in 2009 had been killed
Suspected to have split into rival factions in 2012
Military claims in August 2013 that Mr Shekau and his second-in-command Momodu Bama have been killed in separate attacks; no independent confirmation of claim
Who are Nigeria's Boko Haram?
While Boko Haram's main focus is Nigeria, the US has cited links to the al-Qaeda affiliate in West Africa, and extremist groups in Mali.
The US state department has not formally announced its decision to brand the group a terrorist organisation.
However, the Associated Press news agency cited an unnamed US official, whilst Reuters quoted congressional sources and others briefed on the matter.
Nigeria's government declared Boko Haram and another militant group Ansaru as terrorist organisations in June, warning that anyone who helps them will face a minimum prison sentence of 20 years.
The BBC's Nigeria analyst, Naziru Mikailu, says the US's decision will be welcomed by the Nigerian government and the Christian Association of Nigeria, which has long been campaigning for the US to declare Boko Haram a terrorist group.
The Obama administration had so far refused, fearing that it could give Boko Haram greater legitimacy in global jihadi circles, our correspondent says.
The US is unlikely to identify Boko Haram's financial backers, when the Nigerian government has up to now failed to do so, he says.
Last year, top US diplomat for Africa Johnnie Carson said Boko Haram exploited popular discontent in northern Nigeria, and the government needed to tackle the political and economic grievances of the mainly Muslim population in the region.
However, Mr Carson acknowledged "reports of contact and growing relationships between elements of Boko Haram and other extremists in Africa, including al-Qaeda in the Islamic Maghreb".
In August 2011, an attack on a UN building in Abuja, Nigeria, marked a turning point as a threat to US interests.
Last year, Lisa Monaco - now the chief counter-terrorism adviser to President Barack Obama - sent a letter to the state department saying Boko Haram met the criteria to be listed as a "foreign terrorist" group because, she said, it either engages in terrorism that threatens the US or has a capability or intent to do so.
The state department later designated three alleged Boko Haram leaders as terrorists, but stopped short of a wider declaration against the group.