Santosh Kharat, 30, and his accomplice have been arrested for the murder of railway employee Maruti Dethe at the Sanjay Gandhi National Park in Thane on Monday.
Police inspector Prakash Gawahane said: "Dethe's wife was Kharat's former girlfriend. She would meet Kharat secretly and tell him about Dethe's extra-marital affair. To end the woman's problems, Kharat decided to kill Dethe."
According to their plan, the accused invited Dethe and his wife for a party at Byculla on Saturday.
From there, he took the couple to a secluded place near the Aiyappa temple in Thane, where they consumed alcohol.
When Dethe passed out, Kharat smashed his head with a stone. With the help of his friend Vikas Damodar Malave, 30, Kharat put the body in a sack and disposed it of in the park.
The body was found on Monday.
The police are checking whether the wife too was involved in the plot.