A grinding noise sometimes happens when the brakes are applied. When I turn off the ESC, the noise somewhat goes away.
You should have your brakes inspected for any issues like metal to metal grinding or another related issue. This may just be a brake pad service issue or a more serious problem with the ESC. Only a thorough check will verify the problem. I recommend that you have a mechanic, such as one from YourMechanic, inspect your vehicle’s brake system for you.