Infections with intestinal worms, such as Ascaris lumbricoides, affect hundreds of millions of people in all tropical and subtropical regions of the world. Through large-scale deworming programs, World Health Organization aims to reduce moderate-to-heavy intensity infections below 1%. Current diagnosis and monitoring of these control programs are solely based on the detection of worm eggs in stool. Here we describe how metabolome analysis was used to identify the A. lumbricoides-specific urine biomarker 2-methyl pentanoyl carnitine (2-MPC). This biomarker was found to be 85.7% accurate in determining infection and 90.5% accurate in determining a moderate-to-heavy infection. Our results also demonstrate that there is a correlation between 2-MPC levels in urine and A. lumbricoides DNA detected in stool. Furthermore, the levels of 2-MPC in urine were shown to rapidly and strongly decrease upon administration of a standard treatment (single oral dose of 400 mg albendazole). In an Ascaris suum infection model in pigs, it was found that, although 2-MPC levels were much lower compared to humans, there was a significant association between urinary 2-MPC levels and both worm counts (p = 0.023) and the number of eggs per gram (epg) counts (p < 0.001). This report demonstrates that urinary 2-MPC can be considered an A. lumbricoides-specific biomarker that can be used to monitor infection intensity.