If you think using plants to cure disease is a thing of the past, think again! Today, many medicines in drugstores contain chemicals from medicinal plants. An herb called sweet wormwood (Artemisia annua) is one of them. Sweet wormwood is a very effective medicine to treat malaria, the world’s deadliest disease. The active ingredient, artemisinin, kills malaria-causing parasites faster than any other medicine. We wanted to understand exactly how this plant makes artemisinin. We knew that sweet wormwood converts another molecule (DHAA) into artemisinin. But no one understood how! Here, we solved this biology problem using chemistry. We tagged DHAA molecules by developing a set of chemical reactions. Using technology, we then monitored the conversion of DHAA to artemisinin. We found this conversion happens spontaneously, without enzymes. Also, it occurs faster in the presence of light. Our understanding of artemisinin formation can help us develop better malaria medicines in laboratories.