In this paper, logic gates with electrochemiluminescence (ECL) signal as outputs were constructed based on the use of the thymine (T)-rich (S1) or cytosine (C)-rich (S2) oligonucleotides for the selective analysis of mercury ions (Hg2+) or silver ions (Ag+), respectively. Firstly, Ru-silica (Ru(bpy)32+-doped silica) labeled S1 and S2 were absorbed onto multiwalled carbon nanotubes (MCNTs) to form MCNTs/Ru-silica labeled S1/Ru-silica labeled S2 complex, which result in the quenching of the ECL of Ru-silica via the energy-transfer and electron-transfer process. Upon the MCNTs/S1/S2 interaction and coordination chemistry of Hg2+ bridge thymine bases and Ag+ specifically bridge cytosine bases, OR, INHIBIT, and NOR logic gates were designed to operate the ECL of Ru-silica nanoparticles. The ECL signal changed according to different input combinations, and the combinatorial logic gates (OR and INHIBIT) provided a beneficial approach for multiplex analysis. The proposed logic gates may have a great potential in further DNA circuits and advanced sensors for the identification of multiple targets in complex chemical environments.