Cilic tested positive for banned substance nikethamide in April and was given a suspension in September, backdated to 1 May.
This is the third time in just over two years that the Court of Arbitration for Sport has reduced the length of bans issued to tennis players. As all professionals now receive considerable anti-doping education, its latest reasons will be carefully studied when made public.
But the Croat's appeal to the Court of Arbitration for Sport (Cas) was partially upheld, meaning he is eligible to return to competition.
The 25-year-old has won nine career titles and is a former Australian Open semi-finalist.
"The panel determined that the degree of fault committed by the athlete was inferior to that established in the [tribunal] decision," Cas said in a statement.
"The panel also determined that the sanction imposed was too severe in view of the degree of fault and concluded that it should be reduced to four months."
International Tennis Federation president Francesco Ricci Bitti said the ITF "respected the decision of the CAS tribunal, who agreed that an anti-doping rule violation has been committed".
"We await the full decision to better understand CAS's reasoning for reducing the sanction," he added.
Cilic's ranking, which has dropped to 47, is set for an immediate boost with the return of his points from events including the French Open, Wimbledon and Aegon Championships at Queen's Club, London, where he was runner-up to Andy Murray.
Marin Cilic's drugs ban has been reduced from nine to four months.