After jettison in orbit, the ascent engine was fired to depletion as a test.
The ascent stage was not fully fueled since LM-4 was overweight and it would not be taking off from the surface anyway. So it may seem somewhat surprising that it still had enough propellant to escape the moon entirely starting from lunar orbit.
Escape velocity from a surface is equal to sqrt(2) = 1.414 times the velocity of a surface-skimming orbit over the same body, so it does take less delta V to escape from low orbit than to achieve that orbit from the surface.
Gene Cernan has often been asked if they were tempted to land Snoopy and become the first men on the moon. He says that while they could technically have done so, they would have died there because of insufficient ascent-stage fuel, and that tended to discourage the thought.