Grass pea (Lathyrus sativus L.) is a rich source of protein cultivated as an insurance crop in Ethiopia, Eritrea, India, Bangladesh, and Nepal. Its resilience to both drought and flooding makes it a promising crop for ensuring food security in a changing climate. The lack of genetic resources and the crop’s association with the disease neurolathyrism have limited the cultivation of grass pea. Here, we present an annotated, long read-based assembly of the 6.5 Gbp L. sativus genome. Using this genome sequence, we have elucidated the biosynthetic pathway leading to the formation of the neurotoxin, ß-L-oxalyl-2,3-diaminopropionic acid (ß-L-ODAP). The final reaction of the pathway depends on an interaction between L. sativus acyl-activating enzyme 3 (LsAAE3) and a BAHD-acyltransferase (LsBOS) that form a metabolon activated by CoA to produce ß-L-ODAP. This provides valuable insight into the best approaches for developing varieties which produce substantially less toxin.