A new generalization of the Hawking-Hayward quasilocal energy to scalar-tensor gravity is proposed without assuming symmetries, asymptotic flatness, or special spacetime metrics. The procedure followed is simple but powerful and consists of writing the scalar-tensor field equations as effective Einstein equations and then applying the standard definition of quasilocal mass.