An anaerobic hybrid-photobioreactor (AnHPBR) was performed for biogas polishing during piggery wastewater treatment. AnHPBR was exposed to high (4.45 × 105 lx) and low (450 lx) light intensities for growing purple and green sulfur phototrophs separately in each chamber of AnHBBR for soluble sulfide removals. Four phases of hydraulic retention times (HRT, h): 24, 48, 96, and 96 (with added sulfate) of piggery wastewater were operated consecutively for 351 days. Metagenomic analysis of the AnHPBR biomass confirmed that purple and green bacteria were 63–82 %, of which the species varied by HRT and sulfate loadings. In sum, 96 h HRT for AnHPBR presented the highest efficacies in removals of COD (92 %), sulfate (73 %), and sulfide (59 %). Its biogas contained high methane (75 %) and low hydrogen sulfide (0.3 %). Additionally, AnHPBR produced outflow biosolids with a stable sulfur content of 1.88 %.