In this paper we describe finite-dimensional complex Leibniz algebras whose quotient algebra with respect to the ideal I generated by squares is isomorphic to the simple Lie algebra sl2. It is shown that the number of isomorphism classes such of Leibniz algebras coincides with the number of partitions of dim I.