We report the discovery of four relatively massive (2-7 M J) transiting extrasolar planets. HAT-P-20b orbits the moderately bright V = 11.339 K3 dwarf star GSC 1910-00239 on a circular orbit, with a period P = 2.875317 ± 0.000004 days, transit epoch T_c = 2455080.92661 ± 0.00021 (BJD_(UTC)), and transit duration 0.0770 ± 0.0008 days. The host star has a mass of 0.76 ± 0.03 M_☉, radius of 0.69 ± 0.02 R_☉, effective temperature 4595 ± 80 K, and metallicity [Fe/H] = +0.35 ± 0.08. The planetary companion has a mass of 7.246 ± 0.187 M_J and a radius of 0.867 ± 0.033 R_J yielding a mean density of 13.78 ± 1.50 g cm^(–3). HAT-P-21b orbits the V = 11.685 G3 dwarf star GSC 3013-01229 on an eccentric (e = 0.228 ± 0.016) orbit, with a period P = 4.124481 ± 0.000007 days, transit epoch T_c = 2454996.41312 ± 0.00069, and transit duration 0.1530 ± 0.0027 days. The host star has a mass of 0.95 ± 0.04 M_☉, radius of 1.10 ± 0.08 R_☉, effective temperature 5588 ± 80 K, and metallicity [Fe/H] = +0.01 ± 0.08. The planetary companion has a mass of 4.063 ± 0.161 M_J and a radius of 1.024 ± 0.092 R_J yielding a mean density of 4.68^(+1.59)_(–0.99) g cm^(-3). HAT-P-21b is a borderline object between the pM and pL class planets, and the transits occur near apastron. HAT-P-22b orbits the bright V = 9.732 G5 dwarf star HD 233731 on a circular orbit, with a period P = 3.212220 ± 0.000009 days, transit epoch T_c = 2454930.22001 ± 0.00025, and transit duration 0.1196 ± 0.0014 days. The host star has a mass of 0.92 ± 0.03 M_☉, radius of 1.04 ± 0.04 R_☉, effective temperature 5302 ± 80 K, and metallicity [Fe/H] = +0.24 ± 0.08. The planet has a mass of 2.147 ± 0.061 M_J and a compact radius of 1.080 ± 0.058 R_J yielding a mean density of 2.11^(+0.40)_(–0.29) g cm^(–3). The host star also harbors an M-dwarf companion at a wide separation. Finally, HAT-P-23b orbits the V = 12.432 G0 dwarf star GSC 1632-01396 on a close to circular orbit, with a period P = 1.212884 ± 0.000002 days, transit epoch T_c = 2454852.26464 ± 0.00018, and transit duration 0.0908 ± 0.0007 days. The host star has a mass of 1.13 ± 0.04 M_☉, radius of 1.20 ± 0.07 R_☉, effective temperature 5905 ± 80 K, and metallicity [Fe/H] = +0.15 ± 0.04. The planetary companion has a mass of 2.090 ± 0.111 M_J and a radius of 1.368 ± 0.090 R_J yielding a mean density of 1.01 ± 0.18 g cm^(–3). HAT-P-23b is an inflated and massive hot Jupiter on a very short period orbit, and has one of the shortest characteristic infall times (7.5^(+2.9)_(–1.8) Myr) before it gets engulfed by the star