let $\pi$ be a cuspidal automorphic representation of $\mathrm{gl}_n(\mathbb{a}_{\mathbb{q}})$ with non-vanishing cohomology. under a certain local non-vanishing assumption we prove the rationality of the values of the automorphic $l$-function attached to $\pi$ at critical points. conjecturally, any motivic $l$-function coincides with an $l$-function attached to an automorphic representation on $\mathrm{gl}_n$, hence, our result corresponds to a conjecture of deligne on critical values of motivic $l$-functions.