active ingredient percocet is part of the class of medications called narcotic analgesics. Its effects are similar to morphine. percocet can be prescribe for the treatment of pain that is moderate to severe. This medication can be found in a long acting form that can work to treat pain around the clock. percocet is not mean to treat pain immediately after surgery unless you have been taking percocet before your surgery.