High-brightness electron beams are required to drive LINAC-based free-electron lasers (FELs) and storage-ring-based synchrotron radiation light sources. The bunch charge and RMS bunch length at the exit of the LINAC play a crucial role in the peak current; the minimum transverse emittance is mainly determined by the injector of the LINAC. Thus, a photoinjector with a high bunch charge and low emittance that can simultaneously provide high-quality beams for 4th generation synchrotron radiation sources and FELs is desirable. The design of a 1.6-cell S-band 2998-MHz RF gun and beam dynamics optimization of a relevant beamline are presented in this paper. Beam dynamics simulations were performed by combining ASTRA and the multi-objective genetic algorithm NSGA II. The effects of the laser pulse shape, half-cell length of the RF gun, and RF parameters on the output beam quality were analyzed and compared. The normalized transverse emittance was optimized to be as low as 0.65 and 0.92 mm·mrad when the bunch charge was as high as 1 and 2 nC, respectively. Finally, the beam stability properties of the photoinjector, considering misalignment and RF jitter, were simulated and analyzed.