Aims. We investigate the environment of the infrared dust bubble S51 and search for evidence of triggered star formation in its surroundings. Methods. We performed a multiwavelength study of the region around S51 with data taken from large-scale surveys: 2MASS, GLIMPSE, MIPSGAL, IRAS, and MALT90. We analyzed the spectral profile and the distribution of the molecular gas ((CO)-C-13, (CO)-O-18, HCN, HNC, HCO+, C2H, N2H+, and HC3N), and dust in the environment of S51. We used a mid-infrared emission three-color image to explore the physical environment and GLIMPSE color-color diagram [5.8]-[8.0] versus [3.6]-[4.5] to search for young stellar objects and identify the ionizing star candidates. Results. From a comparison of the morphology of the molecular gas and the Spitzer 8.0 mu m emission, we conclude that the dust bubble is interacting with CO at a kinematic distance of 3.4 kpc. The bubble S51 structure, carried with shell and front side, is exhibited with (CO)-C-13 and (CO)-O-18 emission. Both outflow and inflow may exist in sources in the shell of bubble S51. We discover a small bubble G332.646-0.606 (R-in = 26 '', r(in) = 15 '', R-out = 35 '' and r(out) = 25 '') located at the northwest border of S51. A water maser, a methanol maser, and IRAS 16158-5055 are located at the junction of the two bubbles. Several young stellar objects are distributed along an arc-shaped structure near the S51 shell. They may represent a second generation of stars whose formation was triggered by the bubble expanding into the molecular gas.