Aflatoxin B1 (AFB1) can cause great threat to human health, so the development of convenient and portable device for sensitive detection of AFB1 is highly desired. The portable pH meter has the characters of facile operation, low cost, and easy availability. Therefore, in this study, we investigate the applicability of utilizing a pH meter as the readout to develop a portable sensor for AFB1. The specific detection of AFB1 is realized via the combination of AFB1-responsive aptamer-cross-linked hydrogel. Upon the addition of AFB1, AFB1 binds to its aptamer with high affinity in lieu of aptamer/DNA complex, causing the collapse of hydrogel network and results in the releasing of urease into the solution. The released urease can catalyse the hydrolysis of urea and result in the rise of pH value. The change of pH value has a direct relationship to the concentration of AFB1 in the range of 0.2-20µM with a detection limit of 0.1µM (S/N = 3). The proposed portable device is successfully applied to assay AFB1 in the food samples with satisfied results.