Developing a facile, intuitive, ultrahigh-sensitive sensor to detect harmful substances in water is critical. Here, an ultrahigh-sensitive sensor is fabricated using a quaternized lamellae-structured polystyrene-b-poly(2-vinylpyridine) (PS-b-P2VP) block copolymer (BCP), capable of detecting the heavily used surfactants including sodium dodecyl sulfate (SDS) and sodium methyl sulfate (SMS) through direct visualization of the structural color change. Two distinct detecting mechanisms, including unexpected blue-shifting and red-shifting reflectance wavelengths, are found for low and high concentrations of the SDS surfactant, respectively, due to concentration-dependent compatibility between the quaternized P2VP (QP2VP) block chains and SDS molecules. As the SDS concentration is low (0-1 mM), the QP2VP chains undergo the counter anionic exchange with the hydrophobic alkyl chains of the SDS, resulting in a blue shift toward colorlessness. In contrast, as the SDS concentration is high (>1 mM), the nanoaggregation of the SDS molecules in the layered QP2VP microdomain leads to enhanced hydration nature and increased lamellar periodicity with the red-shifting reflectance wavelength. In contrast, SMS with weaker hydrophobicity results in unchanged and red-shifting reflectance wavelengths at low and high concentrations. Inspired by this, detecting the extremely low-concentration SDS surfactant (0.01 mM) by direct visualization is achieved. The structural color change for surfactant detection also exhibits excellent reversibility and discriminability, providing a straightforward method of detecting anionic surfactants.