Like any empirical "law" that is proven to be wrong, this starts from a correct observation that is extrapolated too far from what has been actually observed.

The part that is true is that whenever you have a set of animal species that have evolved from a common ancestor, any individuals resemble more and more when you look at earlier stages of their embryonic development.

It is very obvious why this has to be true. The embryonic development of all animals starts from a similar single spherical cell, which develops until the adult form and all the intermediate stages are related by continuous transformations, e.g. a leg cannot appear instantaneously, first a budding region on the trunk becomes differentiated, then the leg grows slowly from that region, attaining the final size and form after many intermediate stages.

Therefore any different species have to start from a similar egg cell and grow initially in the same way, until some point after which the growth patterns diverge visibly, in order to reach different adult forms at the end of the growth.

The more similar are the adult forms, the later in the embryonic development the growth patterns need to diverge in order to create the differences in the adult forms.

So studying the similarities in the embryonic development remains as important today as in the time of Haeckel, as a tool to determine the relatedness between different animal species. Now there are much more powerful methods than simple microscopic observations, e.g. the study of which genes are expressed in various kinds of embryonic cells, using fluorescent markers to follow the individual fate of various cells, and so on.

The fallacy of saying that "ontogeny recapitulates phylogeny" was in believing that some species are primitive and others are highly evolved.

Therefore it was assumed that there was an initial embryonic development pattern identical to that of the supposedly primitive species, and only the highly evolved species diverged more and more from that.

For example it was supposed that fishes are primitive so all terrestrial vertebrates must have developed initially like fishes, then they began to develop like the amphibians, then only the amniotes developed differently and they did this like the lizards, which seem to be more primitive, then the mammals began to develop differently at a later stage of the embryonic development, and so on until the embryonic development of the humans.

After some years, it was eventually understood that this view is incorrect. All the animal species that have their origin in some common ancestor, e.g. one hundred million years ago, have evolved divergently from it and none has retained its exact characteristics.

So if we look at the embryonic development of a fish and of a human, the fact that the fish looks more primitive is not enough evidence that the embryonic development of the common ancestor was like that of a modern fish. Until further evidence, it could have been more like that of a human. Much more research is needed for each characteristic to determine how it was in an ancestor.

The reason is that there are a lot of characteristics that evolve independently, and every present species may be primitive in some characteristics and highly evolved in other characteristics.

While the fishes have retained the primitive characteristic of living in the water, they may have evolved a lot in other less visible characteristics. We actually know that the terrestrial vertebrates have evolved from some kinds of fishes that were quite different from most of the present fishes, and which have been wiped out by the end-Devonian extinction.

The bony fishes, which dominate now the water environments, have evolved from another kind of primitive fishes, which were much less important before the end-Devonian extinction. Like the terrestrial vertebrates, the bony fishes have also evolved to be quite different from their ancestors, even if they have remained aquatic.

The conclusion is that while it is good to know that ontogeny does not recapitulate phylogeny, it is better to know which part of this concept is wrong, and why.