BackgroundGenital herpes (GH) is the main infectious cause of genital ulcers worldwide. Clinical diagnosis alone may be misleading, especially in immunocompromised patients in whom atypical presentations are common.ObjectivesTo assess the herpetic etiology of genital ulcers in immunocompromised and immunocompetent hospitalized adults, and to identify the most frequent differential diagnoses within each patient group.MethodsWe conducted a retrospective transverse study at a third‐level center in Mexico City using PCR testing (HSV‐1, HSV‐2, VZV) in hospitalized patients with genital ulcers to diagnose GH. When negative, biopsy and tissue cultures were taken to establish the final diagnosis. Data from a 2‐year period (March 2021 to April 2023), including demographic characteristics, comorbidities, initial clinical suspicion, PCR test results, skin tissue biopsy results, cultures results, and final diagnosis, were collected from May 2023 to June 2023.ResultsA total of 59 hospital patients with genital ulcers underwent PCR testing due to clinical suspicion of GH, of which 39 (66%) were immunocompromised. The diagnosis was confirmed in 32/59 cases (54%), of which 22/32 (69%) were immunocompromised and 10/32 (31%) immunocompetent. In the 17 immunocompromised adults in whom GH was excluded, other viral (34%) or bacterial (23%) infections were the next most frequent etiologies. Meanwhile, among the 10 immunocompetent patients without GH, noninfectious causes, such as incontinence‐associated dermatitis (15%) and trauma or pressure ulcers (15%), were the most prevalent.ConclusionsGenital ulcers in hospitalized adults should raise the suspicion of infectious etiologies, particularly of GH. Diagnostic confirmation with tests such as PCR is crucial given the uncertainty of its clinical diagnosis. Once GH diagnosis is excluded, immunocompromised patients should be evaluated for other infectious etiologies, while noninfectious causes should be considered first in immunocompetent patients.