New portable hydrogel sensors for Al3+ and Fe3+ detection were designed based on the aggregation-induced emission (AIE) and color change of N-doped carbon dots (N-CDs). N-CDs with yellow fluorescence were prepared by a one-pot hydrothermal method from 2,5-dihydroxyterephthalic acid and acrylamide. The fluorescence of N-CDs was enhanced by Al3+ about 20 times and quenched by Fe3+. It was interesting that although Fe3+ showed obvious quenching on the fluorescence of N-CDs it did not cause a noticeable change in the fluorescence of N-CDs + Al3+. The colorless solution of N-CDs appeared blue in the presence of Fe3+ without the influence of Al3+. Therefore, the turn-on fluorometry and colorimetry systems based on N-CDs were constructed for the simultaneous detection of Al3+ and Fe3+. Furthermore, the portable sensing of Al3+ and Fe3+ was realized with the assistance of hydrogel, filter paper, cellulose acetate, and cellulose nitrate film. The proposed approach was successfully applied to the detection of Al3+ and Fe3+ in food samples and cell imaging.