Abstract Most fast radio bursts (FRB) do not show evidence of repetition, and such non-repeating FRBs may be produced at the time of a merger of binary neutron stars (BNS), provided that the BNS merger rate is close to the high end of the currently possible range. However, the merger environment is polluted by dynamical ejecta, which may prohibit the radio signal from propagating. We examine this by using a general-relativistic simulation of a BNS merger, and show that the ejecta appears about 1 ms after the rotation speed of the merged star becomes the maximum. Therefore there is a time window in which an FRB signal can reach outside, and the short duration of non-repeating FRBs can be explained by screening after ejecta formation. A fraction of BNS mergers may leave a rapidly rotating and stable neutron star, and such objects may be the origin of repeating FRBs like FRB 121102. We show that a merger remnant would appear as a repeating FRB on a time scale of ∼1–10 yr, and expected properties are consistent with the observations of FRB 121102. We construct an FRB rate evolution model that includes these two populations of repeating and non-repeating FRBs from BNS mergers, and show that the detection rate of repeating FRBs relative to non-repeating ones rapidly increases with improving search sensitivity. This may explain why only the repeating FRB 121102 was discovered by the most sensitive FRB search with Arecibo. Several predictions are made, including the appearance of a repeating FRB 1–10 yr after a BNS merger that is localized by gravitational waves and subsequent electromagnetic radiation.