Aryl hydrocarbon receptor modulators of formula, and pharmaceutically acceptable salts thereof, R' is selected from the following substituents: H, two R a is independently H, or two R a together form =O, =N-CN or =N-W 3 -R 1; when W 3 is O or NH, R 1 is H, C m H 2m +1, C m H 2 m +1 C, C m H 2 m +1 OC or C m H 2 m +1 S 1∼2; A is C 2 to C 10 heteroaromatic ring containing 1 to 5 heteroatoms selected from N, O and S, or 4 to 7 membered non-aromatic heterocyclic ring containing 1 to 3 heteroatoms selected from N, O and S and containing C=N, which are with no substituent or substituted by 1 to 3 R; Q is R or a 3 to 10 membered, preferably 4 to 7 membered, more preferably 5 to 6 membered heterocyclic ring, preferably heteroaryl ring with no substituent or substituted by 1 to 3 R, which contains 1 to 5, preferably 1 to 3, more preferably 2 to 3 heteroatoms selected from N, O and S; R is R c connected with C or R N connected with N, wherein each R c is independently R", -Y-NR" 2, -Y-NR"C R", -Y-NR"C NR" 2, -Y-OC NR" 2, -Y-NR"C OR", -Y-S 1∼2 R", -Y-S 1∼2 NR" 2 or -Y-NR"S 1∼2 R"; each R N is independently CN, R", -Y-OR", -Y-C R", -Y-OC R", -Y-C OR", -Y-OC OR", -Y-NR" 2, -Y-C NR" 2, -Y-NR"C R", -Y-NR"C NR" 2 -Y-OC NR" 2, -Y-NR"C OR", -Y-S 1∼2 R", -Y-S 1∼2 NR" 2 or -Y-NR"S 1∼2 R"; R" is H, D, C m H 2 m +1, C n H 2 n -1, C n H 2 n -3, C m H 2 m+ 1 -r X r, C n H 2 n- 1 -s X s or C n H 2 n -3- t X t; Y is bond, -C m H 2 m -, -C n H 2 n -2 -, -C n H 2 n -4 -, -C m H 2 m- i X i -, -C n H 2 n -2-j X j - or -C n H 2 n -4 -k X k; m is 1 to 3, n is 2 to 4, u is 1 to 3, r ≤2 m +1, s ≤2 n -1, t ≤2 n -3, i ≤2m, j ≤2 n -2, k ≤2 n -4; X is F, Cl or Br. R' is selected from the following substituents: H, two R a is independently H, or two R a together form =O, =N-CN or =N-W 3 -R 1; when W 3 is O or NH, R 1 is H, C m H 2m +1, C m H 2 m +1 C, C m H 2 m +1 OC or C m H 2 m +1 S 1∼2; A is C 2 to C 10 heteroaromatic ring containing 1 to 5 heteroatoms selected from N, O and S, or 4 to 7 membered non-aromatic heterocyclic ring containing 1 to 3 heteroatoms selected from N, O and S and containing C=N, which are with no substituent or substituted by 1 to 3 R; Q is R or a 3 to 10 membered, preferably 4 to 7 membered, more preferably 5 to 6 membered heterocyclic ring, preferably heteroaryl ring with no substituent or substituted by 1 to 3 R, which contains 1 to 5, preferably 1 to 3, more preferably 2 to 3 heteroatoms selected from N, O and S; R is R c connected with C or R N connected with N, wherein each R c is independently R", -Y-NR" 2, -Y-NR"C R", -Y-NR"C NR" 2, -Y-OC NR" 2, -Y-NR"C OR", -Y-S 1∼2 R", -Y-S 1∼2 NR" 2 or -Y-NR"S 1∼2 R"; each R N is independently CN, R", -Y-OR", -Y-C R", -Y-OC R", -Y-C OR", -Y-OC OR", -Y-NR" 2, -Y-C NR" 2, -Y-NR"C R", -Y-NR"C NR" 2 -Y-OC NR" 2, -Y-NR"C OR", -Y-S 1∼2 R", -Y-S 1∼2 NR" 2 or -Y-NR"S 1∼2 R"; R" is H, D, C m H 2 m +1, C n H 2 n -1, C n H 2 n -3, C m H 2 m+ 1 -r X r, C n H 2 n- 1 -s X s or C n H 2 n -3- t X t; Y is bond, -C m H 2 m -, -C n H 2 n -2 -, -C n H 2 n -4 -, -C m H 2 m- i X i -, -C n H 2 n -2-j X j - or -C n H 2 n -4 -k X k; m is 1 to 3, n is 2 to 4, u is 1 to 3, r ≤2 m +1, s ≤2 n -1, t ≤2 n -3, i ≤2m, j ≤2 n -2, k ≤2 n -4; X is F, Cl or Br.