Acute pain-related pathology is a significant challenge in clinical practice, and the limitations of traditional pain-relief drugs have made it necessary to explore alternative approaches. Photobiomodulation (PBM) therapy using CO2 laser has emerged as a promising option. In this study, we aimed to identify the optimal parameters of CO2 laser irradiation for acute pain relief through in vivo and in vitro experiments. First, we validated the laser intensity used in this study through bone marrow mesenchymal stem cells (BMSCs) experiments to ensure it will not adversely affect stem cell viability and morphology. Then we conducted a detailed evaluation of the duty cycle and frequency of CO2 laser by the hot plate and formalin test. Results showed a duty cycle of 3% and a frequency of 25 kHz produced the best outcomes. Additionally, we investigated the potential mechanisms underlying the effects of CO2 laser by immunohistochemical staining, and found evidence to suggest that the opioid receptor may be involved in its analgesic effect. In conclusion, this study provides insights into the optimal parameters and underlying mechanisms of CO2 laser therapy for effective pain relief, thereby paving the way for future clinical applications.