US Customs and Border Protection said in a statement later that the gas was used to target rock throwers apart from the migrants who were trying to cross.
US border agents launched tear gas into Mexico early Tuesday to deter a group of migrants from crossing the US-Mexico border at Tijuana, according to a Reuters witness and the US government.
Clouds of the noxious gas could be seen wafting up from around the fence at the border, and one migrant picked up a canister and threw it back across the border into US territory.
Tijuana has become a flashpoint in the debate over US immigration policy, which has been intensified by the recent deaths of two migrant children in US custody and a partial US government shutdown over President Donald Trump's $5 billion demand to lawmakers for a wall along the border with Mexico.
A previous incident in November when US agents fired gas into Mexico to disperse migrants triggered a call from Mexico for an investigation.
A spokesman for Mexico's foreign ministry did not immediately respond to a request for comment.
Late Monday, more than 150 Central American migrants approached an area of the border in Tijuana in the Playas neighbourhood near the beach.
Migrants said they thought security measures might be relaxed due to the New Year's holiday.
After midnight, US security personnel fired tear gas into Mexico as some migrants prepared to climb a border fence, according to the Reuters witness. During a second attempt, migrants began to pass youths and children over the razor wire along the fencing to the US side.
US Customs and Border Protection (CBP) said in a statement that the gas was aimed upwind of people throwing rocks on the Mexican side who obstructed agents from helping the children being passed over razor wire.
The CBP statement said agents had not directly targeted the migrants attempting to cross the fence with gas and pepper spray.
"No agents witnessed any of the migrants at the fence line, including children, experiencing effects of the chemical agents, which were targeted at the rock throwers further away," the statement said.
A Reuters witness did not see any migrants throwing rocks at US agents, and documented in one photo where a migrant had been hit by what appeared to be a gas canister.
An Associated Press photographer saw at least three volleys of gas launched onto the Mexican side of the border near Tijuana's beach that affected the migrants, including women and children, as well as journalists.
The AP saw rocks thrown only after US agents fired the tear gas.
CBP said most of the migrants attempting to cross returned back to Mexico while 25 people, including two teenagers, were detained.
Customs and Border Protection said that under its use of force policy the incident would be reviewed by its Office of Professional Responsibility.
Thousands of Central American migrants have been camping at shelters in Tijuana since arriving in November after travelling in caravans across Mexico to reach the US border, where many have hoped to request asylum.