A lattice Boltzmann flux solver (LBFS) is presented in this work for simulation of incompressible viscous and inviscid flows. The new solver is based on Chapman-Enskog expansion analysis, which is the bridge to link Navier-Stokes (N-S) equations and lattice Boltzmann equation (LBE). The macroscopic differential equations are discretized by the finite volume method, where the flux at the cell interface is evaluated by local reconstruction of lattice Boltzmann solution from macroscopic flow variables at cell centers. The new solver removes the drawbacks of conventional lattice Boltzmann method such as limitation to uniform mesh, tie-up of mesh spacing and time interval, limitation to viscous flows. LBFS is validated by its application to simulate the viscous decaying vortex flow, the driven cavity flow, the viscous flow past a circular cylinder, and the inviscid flow past a circular cylinder. The obtained numerical results compare very well with available data in the literature, which show that LBFS has the second order of accuracy in space, and can be well applied to viscous and inviscid flow problems with non-uniform mesh and curved boundary.