The incidence of magnet ingestion by children has recently increased in China. Magnet ingestion is associated with an extremely high risk of gastrointestinal damage because loops of bowel can become trapped and squeezed between multiple magnets in different locations. However, the lack of imaging sensitivity makes clinical decision-making difficult. This study was conducted to investigate the performance of ultrasound in diagnosing gastrointestinal magnet ingestion in children. From April 2017 to February 2021, all children with a history of magnet ingestion or a diagnosis of gastrointestinal magnet as shown by x-ray or ultrasound in our hospital were included as study candidates. Patients who were lost to follow-up or had known malformations of the gastrointestinal tract were excluded. Eligible patients were those with surgical or endoscopic confirmation of gastrointestinal magnet, those who passed the magnet out of the alimentary tract without assistance, and those with confirmed absence of the magnet on abdominal x-ray examination after 1 month of conservative treatment. All eligible patients' ultrasound and x-ray examination data were evaluated. The sensitivity, specificity, and area under the curve (AUC) of ultrasound was calculated for diagnosing magnet ingestion, locating the magnet (stomach, small intestine, or colon), and confirming the phenomenon of wall entrapment. Of 112 patients, 107 had a magnetic foreign body and 5 did not. Magnets were correctly detected by ultrasound in 97 patients, with an observed sensitivity of 90.65% and specificity of 100%. Satisfactory sensitivity was obtained for ultrasound localization of gastric magnets (96.30%) and small intestinal magnets (100.00%), but sensitivity for ultrasound localization of colonic magnets was relatively poor (73.33%). The discrimination of wall entrapment by ultrasound was good (AUC = 0.93), with an observed sensitivity and specificity of 92.00% and 93.62%, respectively. Ultrasound can be used to locate gastrointestinal magnets (in the stomach, small intestine, or colon) with good clinical efficacy in identifying wall entrapment.