A highly sensitive electrochemical sensor containing nitrogen-doped ordered mesoporous carbon (NOMC) for voltammetric determination of l-tryptophan.