Two Schiff base probes (S1 and S2) were prepared and synthesized by incorporating thienopyrimidine into salicylaldehyde or 3‐ethoxysalicylaldehyde individually, with the aim of detecting Ga3+ and Pd2+ sequentially. Upon chelation with Ga3+, S1 and S2 exhibited fluorescence enhancement in DMSO/H2O buffer. Both S1–Ga3+ and S2–Ga3+ were quenched by Pd2+. The limit of detection for S1 in response to Ga3+ and Pd2+ was 2.86 × 10−7 and 4.4 × 10−9 M, respectively. For S2, the limit of detection for Ga3+ and Pd2+ was 4.15 × 10−8 and 3.0 × 10−9 M, respectively. Furthermore, the complexation ratios of both S1 and S2 with Ga3+ and Pd2+ were determined to be 1:2 through Job's plots, ESI‐MS analysis, and theoretical calculations. Two molecular logic gates were constructed, leveraging the response behaviors of S1 and S2. Moreover, the potential utility of S1 and S2 for monitoring Ga3+ and Pd2+ in domestic water was verified.