X-ray powder diffraction and electrical resistivity measurements were performed on the tetragonal compound CeCoSi under pressure to elucidate the phase boundary of the pressure-induced structural transition and the change in the 4$f$ electronic state. The temperature-pressure phase diagram has been determined from the shift of the Bragg peaks and from the anomaly in the resistivity. The critical pressure, $P_{\rm s}$ $\sim$ 4.9 GPa at 300 K, decreases to $P_{\rm s}$ $\sim$ 3.6 GPa at 10 K. The decrease of $P_{\rm s}$ is due not only to the decrease in volume of the unit cell but also to an anisotropic shrinkage by cooling. When crossing the boundary to the high-pressure phase, the resistivity shows a significant drop to exhibit a metallic temperature dependence. The results of this study strongly suggest that the structural phase transition can be ascribed to valence instability of Ce-$4f$ electron.