Helicobacter pylori, sometimes known as H. pylori, is the most prevalent bacterium worldwide; it colonizes the stomachs of people on the planet, and the incidence of the disease is 85–90% in underdeveloped nations. The pathogenicity of bacteria varies according to the type of strain and the virulence factors it carries, such as the cytotoxin-related gene cagA, in addition to risk factors related to the host and environment. Due to the absence of data about the seroprevalence of antibodies to H. pylori in patients with dyspepsia in Libya in general and in the south in particular, the study aimed to assess the prevalence of H. pylori infection and its risk factors in Brack Al-Shati which is located in the Southwest of Libya. The study included 100 serum samples from dyspeptic patients whose ages varied in age from 18 to 72, with an average of 37.27 ± 1.515. All samples were examined using enzyme-linked immunosorbent assays (ELISA) to detect the presence of IgG antibodies against the CagA protein and H. pylori of the bacteria. The findings indicated that the rate of infection with H.pylori was 73% of the total patient samples, and 68.2% of the samples were positive for the CagA protein. Taking into account the frequency of CagA-positive strains and the seroprevalence of H. pylori in dyspeptic patients, we recommend paying attention to eradicating the bacteria through treatment, especially when more than one risk factor is present.