This paper investigates how legal cannabis access affects student performance. Identification comes from an exceptional policy introduced in the city of Maastricht in the Netherlands that discriminated access via licensed cannabis shops based on an individual’s nationality. We apply a difference-in-difference approach using administrative panel data on course grades of local students enrolled at Maastricht University before and during the partial cannabis prohibition. We find that the academic performance of students who are no longer legally permitted to buy cannabis substantially increases. Grade improvements are driven by younger students and the effects are stronger for women and low performers. In line with how cannabis consumption affects cognitive functioning, we find that performance gains are larger for courses that require more numerical/mathematical skills. Our investigation of underlying channels using course evaluations suggests that performance gains are driven by an improved understanding of the material rather than changes in students’ study effort.