Context. Massive stars end their lives with catastrophic supernova (SN) explosions. Key information on the explosion processes and on the progenitor stars can be extracted from observations of supernova remnants (SNRs), the outcome of SNe. Deciphering these observations however is challenging because of the complex morphology of SNRs. Aims. We aim at linking the dynamical and radiative properties of the remnant of SN 1987A to the geometrical and physical characteristics of the parent aspherical SN explosion and to the internal structure of its progenitor star. Methods. We performed comprehensive three-dimensional hydrodynamic simulations which describe the long-term evolution of SN 1987A from the onset of the SN to the full-fledged remnant at the age of 50 years, accounting for the pre-SN structure of the progenitor star. The simulations include all physical processes relevant for the complex phases of SN evolution and for the interaction of the SNR with the highly inhomogeneous ambient environment around SN 1987A. Furthermore the simulations follow the life cycle of elements from the synthesis in the progenitor star, through the nuclear reaction network of the SN, to the enrichment of the circumstellar medium through mixing of chemically homogeneous layers of ejecta. From the simulations, we synthesize observables to be compared with observations. Results. By comparing the model results with observations, we constrained the initial SN anisotropy causing Doppler shifts observed in emission lines of heavy elements from ejecta, and leading to the remnant evolution observed in the X-ray band in the last thirty years. In particular, we found that the high mixing of ejecta unveiled by high redshifts and broadenings of [Fe II] and 44 Ti lines require a highly asymmetric SN explosion channeling a significant fraction of energy along an axis almost lying in the plane of the central equatorial ring around SN 1987A, roughly along the line-of-sight but with an offset of 40 o , with the lobe propagating away from the observer slightly more energetic than the other. Furthermore, we found unambiguously that the observed distribution of ejecta and the dynamical and radiative properties of the SNR can be best reproduced if the structure of the progenitor star was that of a blue supergiant resulted from the merging of two massive stars.