The head coach had been in charge of the north African nation for three years and saw them come close to causing an upset in the second round of the World Cup against Germany.
Having qualified from Group H behind Belgium, Algeria held Joachim Low's side at bay before losing 2-1 in extra-time last Monday.
And six days on from that defeat, Halilhodzic, citing the chance of a new challenge, revealed he is leaving via an official statement on the Algerian Football Association's website.
"Today, after living in Algeria for three years, my family obligations and the lure of new sporting challenges weighed heavily on my decision," the Bosnian said.
"I leave proud of my record and in accordance with the FAF (Algerian Football Association).
"I do not forget to thank the president of FAF, Mohamed Raouraoua, with whom I worked with for three years in close collaboration to achieve the goals we have and has made things available to the group to ensure this difficult mission.
"I wish to pay tribute to the players and the technical, medical and administrative staffs who have fully assisted me throughout my mission.
"I will always keep the fond memories of the extraordinary hospitality of the Algerian public, who supported me from the first day I arrived and remained faithful."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.