Fiji Rugby chairman Humphrey Tawake told a hastily arranged news conference in Suva on Thursday that Cotter’s letter of resignation had been accepted and a new coach will be appointed “in due course.”
Tawake said Cotter had resigned for personal reasons but gave no other details.
In a statement, Cotter expressed regret for his sudden departure.
“I would like to take this opportunity to thank the players and coaches I have worked with during my time with the team,” he said.
“I feel the team has made some significant improvements over the last few years both on and off the field.
“I believe we built a great culture which was testament to some good people working hard and enjoying each other’s company and I’m disappointed to be leaving at this time.”
Cotter has coached Fiji for three years and was previously head coach of Scotland, which he led to the 2015 World Cup quarter-finals.
He recently had been assisted by New Zealanders Daryl Gibson and Glen Jackson in Fiji.
Cotter also previously led New Zealand’s Bay of Plenty and French clubs Clermont and Montpellier, and coached the Crusaders forwards in 2005 in Super Rugby.
Cotter is the latest head coach to leave his role close to the World Cup.
Eddie Jones was dismissed in December as England head coach and went on to take over as Australia coach from Dave Rennie, who was sacked.
Wayne Pivac also was recently replaced as Wales head coach.