To construct longitudinal trajectories of marijuana use in a sample of men who have sex with men living with or at-risk for HIV infection. We determined factors associated with distinct trajectories of use as well as those that serve to modify the course of the trajectory. Data were from 3658 [1439 HIV-seropositive (HIV+) and 2219 HIV-seronegative (HIV-)] participants of the Multicenter AIDS Cohort Study. Frequency of marijuana use was obtained semiannually over a 29-year period (1984-2013). Group-based trajectory models were used to identify the trajectories and to determine predictors and modifiers of the trajectories over time. Four distinct trajectories of marijuana use were identified: abstainer/infrequent (65%), decreaser (13%), increaser (12%) and chronic high (10%) use groups. HIV+ status was significantly associated with increased odds of membership in the decreaser, increaser and chronic high use groups. Alcohol, smoking, stimulant and other recreational drug use were associated with increasing marijuana use across all four trajectory groups. Antiretroviral therapy use over time was associated with decreasing marijuana use in the abstainer/infrequent and increaser trajectory groups. Having a detectable HIV viral load was associated with increasing marijuana use in the increaser group only. Future investigations are needed to determine whether long-term patterns of use are associated with adverse consequences especially among HIV+ persons.