He also tweeted that the children were "very sick before they were given over to Border Patrol."
Her office said she was briefed in El Paso, Texas, on Friday on "recently instituted secondary medical screenings and the more thorough initial health screenings of migrants."
El Paso Mayor Dee Margo said he met with Nielsen and told CNN on Saturday that he agreed with her that the immigration policy is "broken."
"El Paso is dealing with the symptoms as a result of the lack of fortitude in Washington, on both sides of the aisle, to deal with our immigration policy," the Republican said.
Nielsen's trip came days after the death of 8-year-old Felipe Gomez Alonzo in Alamogordo, New Mexico. Felipe was the second Guatemalan child to die in government custody in three weeks. A 7-year-old girl died in El Paso earlier this month.
Nielsen has called the death "deeply concerning and heartbreaking" and requested medical help from other government agencies, including the U.S. Coast Guard. As Nielsen made the trip to Texas, New Mexico's Democratic senators, Tom Udall and Martin Heinrich, sent her a letter Friday seeking answers about the boy's death.
"The timeline, action and factors that led to Felipe's death are still developing, but the information that has become public so far is alarming and demands immediate attention and investigation," the letter says.
U.S. Rep. Raul Grijalva, an Arizona Democrat whose district includes Yuma and much of the U.S.-Mexico-border, on Saturday issued a statement saying Nielsen was visiting Yuma "under the dark cloud of a Republican-induced government shutdown, the president's threats to close the border and the tragic deaths of two children in DHS custody.
Felipe and his father, Agustin Gomez, were apprehended by border agents Dec. 18 near the Paso del Norte bridge connecting El Paso to Juarez, Mexico, according to U.S. Customs and Border Protection. The two were detained at the bridge's processing center and then the Border Patrol station in El Paso, until being taken at about 1 a.m. Sunday to a facility in Alamogordo, New Mexico, about 90 miles (145 kilometers) away.
After an agent noticed Felipe coughing, father and son were taken to an Alamogordo hospital, where Felipe was diagnosed with a common cold and found to have a fever of 103 degrees Fahrenheit (39.4 degrees Celsius), CBP has said.
Felipe was held for observation for 90 minutes, according to CBP, before being released with prescriptions for amoxicillin and ibuprofen.
But the boy fell sick hours later on Monday and was re-admitted to the hospital. He died just before midnight.
New Mexico authorities said late Thursday that an autopsy showed Felipe had the flu, but more tests need to be done before a cause of death can be determined.
Associated Press writers Nomaan Merchant in Houston, Zeke Miller in Washington and Paul Davenport in Phoenix contributed to this story.
This story has been corrected to show that 8-year-old Felipe Gomez Alonzo died in Alamogordo, New Mexico, not El Paso, Texas.