Involved in chemotaxis (PubMed:324984, PubMed:358191, PubMed:392505, PubMed:2188960). Part of a chemotaxis signal transduction system that modulates chemotaxis in response to various stimuli (PubMed:392505, PubMed:2188960). Catalyzes the demethylation of specific methylglutamate residues introduced into the chemoreceptors (methyl-accepting chemotaxis proteins or MCP) by CheR (PubMed:358191, PubMed:392505, PubMed:2188960). Also mediates the irreversible deamidation of specific glutamine residues to glutamic acid (PubMed:6300110, PubMed:6304723). Catalyzes its own deactivation by removing the activating phosphoryl group (PubMed:2188960). [protein]-L-glutamate 5-O-methyl ester + H2O = H(+) + L-glutamyl-[protein] + methanol H2O + L-glutaminyl-[protein] = L-glutamyl-[protein] + NH4(+) Methylesterase activity is activated via phosphorylation in response to negative chemotactic stimuli and is inhibited in the presence of attractants (PubMed:392505, PubMed:2188960). Activation requires both CheA and CheW (PubMed:2188960). Interacts with CheA (PubMed:7578071). Binds to a C-terminal pentapeptide sequence carried by certain receptors (PubMed:16573695). Contains a C-terminal catalytic domain, and an N-terminal region which modulates catalytic activity. Phosphorylated by CheA (PubMed:3280143, PubMed:2188960). Phosphorylation of the N-terminal regulatory domain activates the methylesterase activity (PubMed:2188960). Mutants are defective in chemotaxis. They exhibit very high tumbling rates. Belongs to the CheB family.