McMahon made the announcement in a video posted to Twitter.
"For the last 36 years, I've been blessed to work with some of the most dedicated and hard-working law enforcement professionals," McMahon said in the video. "The eight and a half years serving as your sheriff has been an honor and a privilege."
McMahon served as sheriff starting in December 2012 when he was appointed by the Board of Supervisors. He was elected to his first term as sheriff in June 2014.
It has been an honor to serve as your Sheriff for the past 8 1/2 years. Today I announce my upcoming retirement. pic.twitter.com/QrcluyOIEp— John McMahon (@sheriffmcmahon) June 18, 2021
He began his career in law enforcement in 1985 as a patrol deputy in the Needles station.
"It is now time for me to focus on things in my personal life that require the attention of my wife Shelly and I," McMahon said.