Two-dimensional (2D) topological insulators (TIs), also known as quantum spin Hall (QSH) insulators, are excellent candidates for coherent spin transport related applications because the edge states of 2D TIs are robust against nonmagnetic impurities since the only available backscattering channel is forbidden.Currently, most known 2D TIs are based on a hexagonal (specifically, honeycomb) lattice. Here, we propose that there exists the quantum spin Hall effect (QSHE) in a buckled square lattice. Through performing global structure optimization, we predict a new three-layer quasi-2D (Q2D) structure which has the lowest energy among all structures with the thickness less than 6.0 Å for the BiF system. It is identified to be a Q2D TI with a large band gap (0.69 eV). The electronic states of the Q2D BiF system near the Fermi level are mainly contributed by the middle Bi square lattice, which are sandwiched by two inert BiF 2 layers. This is beneficial since the interaction between a substrate and the Q2D material may not change the topological properties of the system, as we demonstrate in the case of the NaF substrate. Finally, we come up with a new tight-binding model for a two-orbital system with the buckled square lattice to explain the low-energy physics of the Q2D BiF material. Our study not only predicts a QSH insulator for realistic room temperature applications, but also provides a new lattice system for engineering topological states such as quantum anomalous Hall effect.