ZURICH—The World Health Organization has declared Liberia free of Ebola, marking the end of a national outbreak that infected as many as 400 new victims a week at its peak.

In a statement Saturday, the United Nations public health agency said Liberia had gone 42 days—twice Ebola’s maximum incubation period—since the burial of its last confirmed patient without discovering a new case.

Liberia...