AU Microscopii (AU Mic) is the second closest pre-main-sequence star, at a distance of 9.79 parsecs and with an age of 22 million years1. AU Mic possesses a relatively rare2 and spatially resolved3 edge-on debris disk extending from about 35 to 210 astronomical units from the star4, and with clumps exhibiting non-Keplerian motion5-7. Detection of newly formed planets around such a star is challenged by the presence of spots, plage, flares and other manifestations of magnetic 'activity' on the star8,9. Here we report observations of a planet transiting AU Mic. The transiting planet, AU Mic b, has an orbital period of 8.46 days, an orbital distance of 0.07 astronomical units, a radius of 0.4 Jupiter radii, and a mass of less than 0.18 Jupiter masses at 3σ confidence. Our observations of a planet co-existing with a debris disk offer the opportunity to test the predictions of current models of planet formation and evolution.