BixOyFz is prepared by a simple hydrothermal method.
Fuorine greatly affects the electron distribution due to the high electronegativity.
The F/O ratio mainly affect internal electric field of BixOyFz.
The study provides a new strategy to develop efficient photocatalysts.