N-acylethanolamine acid amidase (NAAA) is an N-terminal cysteine hydrolase involved in the hydrolytic inactivation of the lipid mediator palmitoylethanolamide (PEA), showing an optimal activity in acidic conditions. Starting from the X-ray structure of the human NAAA we investigated the mechanism of the hydrolytic inactivation of PEA operated by NAAA, using a multiscale approach in which we combined molecular dynamics and mechanical/molecular mechanics (QM/MM) simulations coupled with enhanced sampling. Our simulations pointed out the critical role of the proton configuration of the catalytic residue, Cys126, and of the acid residues situated in the close proximity to the active site in preserving the architecture of the catalytic site. Starting from a stable Michaelis complex, we reconstructed the free energy profile of NAAA acylation and deacylation occurring during the PEA hydrolysis. Our results outlined the acylation as the rate-limiting step of the entire reaction, in which Cys126 acts as an acid, able to protonate the leaving group, and as a nucleophile, giving a nucleophilic attack on the substrate carbonyl carbon. As supported by kinetic experiments, in which we demonstrated that NAAA can efficiently hydrolyze palmitoyl methyl amide (PMA), the ethanol portion of PEA does not play an indispensable role in the reaction.