A closed connected orientable surface embedded in the 3-sphere S3 splits it into two submanifolds. On the other hand, Heegaard splittings of each submanifold give us a pair of handlebody-knots (a two-component handlebody-link). In this paper, we construct an invariant of such surfaces by using an invariant of handlebody-knots derived from quandles. We compute our invariant in the case of bi-knotted surfaces.