Flexoelectric effect in ferroelectric epitaxy films has attracted significant attention due to its theoretical and application potentials. However, the origin and control of flexoelectric field is not yet fully understood. In this study, we investigated the surface structure of single-domain epitaxial BiFeO3 films with a (111) orientation using grazing incidence X-ray diffraction and X-ray reflection methods. We observed large strain gradient on the surface of the BiFeO3 films, which produces a giant flexoelectric field up to 82.55 MV/m at the surface of 15 nm thick BiFeO3 film. Additionally, we discovered the presence of a surface layer with lower electron density than that of the underlying BiFeO3 layer, which is related to the flexoelectric field. Moreover, with increased film thickness, we found the strain distribution along growth direction of the film is changed, thereby leads to the decreased flexoelectric field and increasing thickness of the surface layer respectively. These findings convinced the coupling between the strain state and surface structure, changing the thickness of the ferroelectric film and consequently the strain state is an efficient way to adjust the flexoelectric field and the surface structure.