Bioremediation of mercury pollution by mercury-resistant bacteria requires the key steps of mercury ions (Hg2+) capture and transportation. Inspired by the functions of mercury transporters in mercury-resistant bacteria, we have fabricated an artificial ionic gate, which may further behave as an Hg2+ biosensor. The gate is constructed by using the asymmetrically modified porous anodic alumina (PAA) film capable of forming Hg2+-activated complexes to control ionic current, while the gate works due to the changes between graphene oxide (GO) and different DNA structures. Specifically, single strand poly(T)n DNA on PAA film may transform into duplex structure through T-Hg2+-T coordination chemistry when Hg2+ exists. Compared with the ring by ring delivery via S-Hg intermediates in bacteria, this artificial gate may show better flexibility for Hg2+ transport, because the poly(T)n-Hg2+ complex can be wrapped in a chain structure with controllable DNA length. Furthermore, with the advantages of simple structure, convenient operation and good practicality, the constructed artificial Hg2+-activated ionic gate has been developed as a biosensor for sensitive detection of Hg2+, with the limit of detection (LOD) down to 0.07 fM. The fabricated ionic gate may be used for building an instrument that can absorb and detect Hg2+ from wastewater in the future.