At a discrete set of magic angles, twisted bilayer graphene has been shown to host extraordinarily flat bands, correlated insulating states, unconventional superconductivity, and distinct Landau level degeneracies. In this work, we design a highly efficient quantum Otto engine using a twisted bilayer graphene sample. Flat bands, which occur at magic angles, make the prospect of extracting useful work from our Otto engine lucrative. We use an eight-band continuum model of twisted bilayer graphene to compute efficiencies and work outputs for magic and non-magic angle twists, and compare the results with an $AB$ stacked bilayer and a monolayer. It is observed that the efficiency varies smoothly with the twist angle and the maximum is attained at the magic angle.