The broad applications of antibiotics in the field of medicine and animal husbandry to treat bacterial infections in humans and animals have affected the rise of risks related to antibiotic contamination. Since the presence of antibiotics in the environment is harmful to the ecological system, this concern needs to be addressed. Among various methods, biodegradation by harnessing specific enzymes such as laccase to eliminate antibiotics has attracted huge attention due to its excellent ability and performance. In this study, the laccase-encoding gene from Trametes hirsuta was introduced and integrated into an expression host, Pichia pastoris. Furthermore, the recombinant laccase was then investigated for its potential activity to degrade ampicillin. The enzyme activity was determined using syringaldazine as a substrate, while biodegradation of ampicillin was tested against Escherichia coli and Staphylococcus aureus using disk diffusion assay. The laccase could be successfully expressed in P. pastoris with the highest activity at 716 U L−1 and showed its potential to functionally deactivate ampicillin as an antibacterial. This study indicates that the use of recombinant laccase for the biodegradation of ampicillin is considered a promising approach since it is safe, sustainable, and eco-friendly.