In this paper, we report a graphene-based plasmonic photodetector optimized using the particle swarm optimization (PSO) algorithm and compatible with complementary metal–oxide–semiconductor (CMOS) technology. The proposed photodetector structure is designed to minimize fabrication challenges and reduce production costs compared to more complex alternatives. Graphene has been used for its unique properties in the detection region, titanium nitride (TiN) as a CMOS-compatible metal, and both to aid in plasmonic excitation. Photodetectors have key parameters influenced by multiple independent variables. However, practical constraints prevent thorough adjustment of all variables to achieve optimal parameter values, often resulting in analysis based on several simplified models. Here we optimize these variables by presenting a new approach in the field of photodetectors using the capabilities of the PSO algorithm. As a result, for the proposed device at the wavelength of 1550 nm, the voltage responsivity is 210.6215 V/W, the current responsivity is 3.7213 A/W, the ultra-compressed length is less than 3$$\mu {\text{m}}$$
μ
m
, and the specific detectivity is 2.566×$${10}^{7}$$
10
7
Jones were obtained. Furthermore, the device in question works under the photothermoelectric effect (PTE) at zero bias and has zero dark current, which ultimately resulted in a very low noise equivalent power (NEP) of 4.5361 $${\text{pW}}/\sqrt{\text{Hz}}$$
pW
/
Hz
.