We show that a class of $mathcal{PT}$ symmetric non-Hermitian Hamiltonians realizing the Yang-Lee edge singularity exhibits an entanglement transition in the long-time steady state evolved under the Hamiltonian. Such a transition is induced by a level crossing triggered by the critical point associated with the Yang-Lee singularity and hence is first-order in nature. At the transition, the entanglement entropy of the steady state jumps discontinuously from a volume-law to an area-law scaling. We exemplify this mechanism using a one-dimensional transverse field Ising model with additional imaginary fields, as well as the spin-1 Blume-Capel model and the three-state Potts model. We further make a connection to the forced-measurement induced entanglement transition in a Floquet non-unitary circuit subject to continuous measurements followed by post-selections. Our results demonstrate a new mechanism for entanglement transitions in non-Hermitian systems harboring a critical point.