Nearly all metals and their alloys are subject to corrosion that causes them to lose their structural integrity or other functionality. It is essential to detect corrosion when it occurs, and preferably at its early stage, so that action can be taken to avoid structural damage or loss of function of metals and their alloys. Because corrosion is mostly an electrochemical process, pH and other electrochemical changes are often associated with it, so it is expected that materials that are pH or otherwise electrochemically responsive can be used to detect and control corrosion. The authors developed a smart coating with a controlled-release system that uses pH-triggered release microcapsules for early detection of corrosion and for corrosion protection. This article describes the relation between pH and corrosion, the design of pH-sensitive microcapsules and their synthesis, as well as selected test results of the smart coating with pH-sensitive microcapsules for corrosion indication and inhibition.