Background: Rectal infection with Chlamydia trachomatis is one of the most common bacterial sexually transmissible infections among men who have sex with men (MSM) with diagnosis rates continuing to rise. Current treatment guidelines recommend either azithromycin 1 g single dose or doxycycline 100 mg twice daily for 7 days. However, there are increasing concerns about treatment failure with azithromycin. We are conducting the first randomised controlled trial (RCT) to compare treatment efficacy of azithromycin versus doxycycline for the treatment of rectal chlamydia in MSM. Methods/Design: The Rectal Treatment Study will recruit 700 MSM attending Australian sexual health clinics for the treatment of rectal chlamydia. Participants will be asked to provide rectal swabs and will be randomised to either azithromycin 1 g single dose or doxycycline 100 mg twice daily for 7 days. Participants will be asked to complete questionnaires about adverse drug reactions, sexual behaviour and drug adherence via short message service and online survey. The primary outcome is the treatment efficacy as determined by a negative chlamydia nucleic acid amplification test at 4 weeks post treatment. Secondary outcomes will utilise whole genome sequencing and mRNA assay to differentiate between treatment failure, reinfection or false positive results. Discussion: Rectal chlamydia is an increasing public health concern as use of pre-exposure prophylaxis against HIV becomes commonplace. Optimal, evidence-based treatment is critical to halting ongoing transmission. This study will provide the first RCT evidence comparing azithromycin and doxycycline for the treatment of rectal chlamydia. The results of this trial will establish which treatment is more efficacious and inform international management guidelines. Trial registration: Australian New Zealand Clinical Trials Registry ACTRN12614001125617.