Gold nanoparticle (GNP) was prepared in situ using poly(ethylenimine)/(phenylthio) acetic acid(PEI/PTA) ion pair self-assembly(IPSAM) as a reducing and a capping material. The upper critical solution temperature of the ion pair was affected by the addition of gold ions. Gold ion could be converted to GNP in the IPSAM suspension by aging for 60–150 min. The aging period was shorter and the surface plasmon resonance signal of GNP was stronger as the ion concentration (0.5 and 2.5 mM) and the temperature (20, 30, and 40 °C) were higher. X-ray photoelectron spectroscopy revealed that gold existed with the PEI/PTA IPSAM as a metallic state after 24 h aging. A transmission electron microscopy revealed that GNP existed on the inside of the IPSAM and the lattice spacing of GNP was about 0.20 nm. The release degree of nile red loaded in the IPSAM under near-infrared (NIR) irradiation was proportional to the GNP content. The maximum release degree for 60 min was about 5.7, 6.5, 17.6, 32.4, and 41.2%, respectively, when the GNP content was 0, 0.25, 0.35, 0.6, and 1.55%. The IPSAM containing GNP would be used as a drug carrier that releases its cargo in answering to NIR irradiation.