Corrosion on steel and copper pipes in industry can trigger pollution and weakness due to undesired chemical and biochemical reactions. Too much or too little inhibitor can decrease its efficiency, even causing waste and pollution. In this contribution, an innovative delivery device driven by hydrogel swelling, mainly consisting of a semi-permeable membrane, a hydrogel-swelling force drive and a release orifice, was developed to control the release of inhibitor in a water system at a constant rate, leading the amount of inhibitor to maintain a proper concentration. The effects of hydrogel mass and orifice dimension on release property were studied for controlling release rate. Moreover, a weight loss experiment on carbon steels was carried out to show the incredible anti-corrosion function of the system.