Adhesives designed for bonding in liquid environments have a broad application prospect. In general, amphiphilic polymer structures are important research objects for underwater bonding. And in the study of underwater adhesives, it was found that they can quickly dispel or absorb interfacial water and form reliable bulk strength and adhesion strength. However, achieving strong adhesion in both water-based and oily environments poses a significant challenge. In this work, an adhesive inspired by barnacles that can meet the bonding requirements in both water-based and oily environments has been prepared. Hydrophilic (polyethylene glycol (PEG)) main chains and hydrophobic (1-Octadecyl thiol (ODT)) side chains are simultaneously integrated into the polyurethane structure. Different from the past, hydrophobic and hydrophilic segments are included in the hard segment and soft segment microregion, respectively; At the same time, both hydrophilic and hydrophobic chain segments have strong crystallization, which greatly strengthens the driving force of molecular segments migration and phase separation compared with ordinary hydrophilic/hydrophobic structures. Water-based and oil-based solvents drive hydrophilic and hydrophobic molecular chains to diffuse to the surface, respectively, which enhances the adhesive strength to hydrophilic and hydrophilic surfaces, respectively. In comparison to the adhesion strength observed in air, the adhesion strength of the adhesive to polymethyl methacrylate (PMMA) increases by 1.72 times in oil environments (from 1.02 to 1.75 MPa). Similarly, the adhesion strength to aluminum (Al) increases by 2.23 times under water (from 1.82 to 4.04 MPa). These findings suggest that the regulation strategy for polymer chains employed in this study holds great potential for advancing adhesive performance in diverse environments.