We propose that the observed stellar halo around the globular cluster ( GC ) NGC 1851 is evidence for its formation in the central region of its defunct host dwarf galaxy . We numerically investigate the long-term dynamical evolution of a nucleated dwarf galaxy embedded in a massive dark matter halo under the strong tidal field of the Galaxy . The dwarf galaxy is assumed to have a stellar nucleus ( or a nuclear star cluster ) that could be the progenitor for NGC 1851 . We find that although the dark matter halo and the stellar envelope of the host dwarf of NGC 1851 can be almost completely stripped during its orbital evolution around the Galaxy , a minor fraction of stars in the dwarf can remain trapped by the gravitational field of the nucleus . The stripped nucleus can be observed as NGC 1851 with no/little dark matter whereas stars around the nucleus can be observed as a diffuse stellar halo around NGC 1851 . The simulated stellar halo has a symmetric distribution with a power-law density slope of \sim - 2 and shows no tidal tails within \sim 200 pc from NGC 1851 . We show that two GCs can merge with each other to form a new nuclear GC embedded in field stars owing to the low stellar velocity dispersion of the host dwarf . This result makes no assumption on the ages and/or chemical abundances of the two merging GCs . Thus the observed stellar halo and characteristic multiple stellar populations in NGC 1851 suggest that NGC 1851 could have formed initially in the central region of an ancient dwarf galaxy . We predict that the stellar halo of NGC 1851 may have at least three different stellar populations . We also suggest some Galactic GCs with diffuse halos , such as NGC 1904 and NGC 5694 , could be formed in a similar way as NGC 1851 . We discuss the importance of GC merging within dwarfs in the formation of multiple stellar populations with abundance spreads in heavy elements in some Galactic GCs , such as M22 and NGC 2419 . We also discuss other possible scenarios for the formation of the stellar halo around NGC 1851 .