The Briton joined the team ahead of the 2021-2022 season and secured a podium finish in Seoul but has endured a difficult campaign this year.
He has registered just two points finishes all year, including sixth in Hyderabad and 10th in the opening Berlin E-Prix race, leaving him with a total of nine points.
He was left with a bruised hand which required a hospital visit in Monaco after a collision during the race.
Mahindra confirmed on Sunday that “a mutual agreement” has been reached with Rowland, who will miss the remaining seven races this season, beginning with the double-header in Jakarta next weekend.
Merhi joins having competed in the Berlin Rookie Test with Mahindra earlier this year and will make his Formula E debut in Indonesia.
“It’s a huge honour for me to step in and represent Mahindra Racing for the races in Jakarta,” he said.
“I’m incredibly grateful for the opportunity and I’m determined to make the most of it. I had a chance to drive the M9Electro at the rookie test in Berlin but Formula E is very different to any of the other series I’ve raced in so the learning curve will be steep. But I feel ready, excited and up for the challenge.”
The team has yet to confirm if Merhi will compete in the remaining races this season, with Indian driver Jehan Daruvala the team’s official reserve driver but who is unavailable for the Jakarta weekend due to his Formula 2 commitments.
Mahindra Racing CEO Frederic Bertrand, added: “We are delighted to welcome Roberto to the Mahindra Racing team.
“Roberto has impressive experience in top-level racing and a good track record in major championships. He had a great run with us at the Rookie Test in Berlin last month and we could see he had the potential to become a great asset for the Mahindra Racing team.
“It’s not easy to jump in mid-season, but Roberto has experience of working with the team, so I’m sure he will slot into the team brilliantly.”