Sexual minority cisgender men and transgender (SMMT) individuals, particularly emerging adults (aged 18-34 years), often report hazardous drinking. Given that alcohol use increases the likelihood of HIV risk behaviors, and HIV disproportionately affects SMMT individuals, there is a need to test interventions that reduce hazardous alcohol use and subsequent HIV risk behaviors among this population. Ecological momentary interventions (EMIs), which use mobile phones to deliver risk reduction messages based on current location and behaviors, can help to address triggers that lead to drinking in real time. This study will test an EMI that uses motivational interviewing (MI), smartphone surveys, mobile breathalyzers, and location tracking to provide real-time messaging that addresses triggers for drinking when SMMT individuals visit locations associated with hazardous alcohol use. In addition, the intervention will deliver harm reduction messaging if individuals report engaging in alcohol use. We will conduct a 3-arm randomized controlled trial (N=405 HIV-negative SMMT individuals; n=135, 33% per arm) comparing the following conditions: (1) Tracking and Reducing Alcohol Consumption (a smartphone-delivered 4-session MI intervention), (2) Tracking and Reducing Alcohol Consumption and Environmental Risk (an EMI combining MI with real-time messaging based on geographic locations that are triggers to drinking), and (3) a smartphone-based alcohol monitoring-only control group. Breathalyzer results and daily self-reports will be used to assess the primary and secondary outcomes of drinking days, drinks per drinking day, binge drinking episodes, and HIV risk behaviors. Additional assessments at baseline, 3 months, 6 months, and 9 months will evaluate exploratory long-term outcomes. The study is part of a 5-year research project funded in August 2022 by the National Institute on Alcohol Abuse and Alcoholism. The first 1.5 years of the study will be dedicated to planning and development activities, including formative research, app design and testing, and message design and testing. The subsequent 3.5 years will see the study complete participant recruitment, data collection, analyses, report writing, and dissemination. We expect to complete all study data collection in or before January 2027. This study will provide novel evidence about the relative efficacy of using a smartphone-delivered MI intervention and real-time messaging to address triggers for hazardous alcohol use and sexual risk behaviors. The EMI approach, which incorporates location-based preventive messaging and behavior surveys, may help to better understand the complexity of daily stressors among SMMT individuals and their impact on hazardous alcohol use and HIV risk behaviors. The tailoring of this intervention toward SMMT individuals helps to address their underrepresentation in existing alcohol use research and will be promising for informing where structural alcohol use prevention and treatment interventions are needed to support SMMT individuals. ClinicalTrials.gov NCT05576350; https://www.clinicaltrials.gov/study/NCT05576350. PRR1-10.2196/55166.