We continue our study of the Noether–Lefschetz loci in toric varieties and investigate deformation of pairs (V, X) where V is a complete intersection subvariety and X a quasi-smooth hypersurface in a simplicial projective toric variety PΣ2k+1 , with V⊂ X . The hypersurface X is supposed to be of Macaulay type, which means that its toric Jacobian ideal is Cox–Gorenstein, a property that generalizes the notion of Gorenstein ideal in the standard polynomial ring. Under some assumptions, we prove that the class λV∈ Hk,k(X) deforms to an algebraic class if and only if it remains of type (k, k). Actually we prove that locally the Noether–Lefschetz locus is an irreducible component of a suitable Hilbert scheme. This generalizes Theorem 4.2 in our previous work (Bruzzo and Montoya 15(2):682–694, 2021) and the main theorem proved by Dan (in: Analytic and Algebraic Geometry. Hindustan Book Agency, New Delhi, pp 107–115, 2017).