A generalized data assimilation model for turbulent flows using the continuous adjoint formulation is proposed. Within this formulation, the Spalart-Allmaras turbulence model is modified by adding a correction function β as a spatially varying coefficient to the turbulence production term. The model-form error is thus corrected by optimizing the β distribution, using the adjoint equations and the corresponding boundary conditions, to minimize the discrepancy between the predictions and observations. In addition, a constraint is applied to drive β toward a large value to avoid the flow unsteadiness owing to the low eddy viscosity. The present adjoint-based data assimilation (ABDA) model is expected to be applicable to various flow conditions unsolvable by the simple optimization of the model constant. This model is fully equation-driven and is thus computationally cheaper than the discretized adjoint method, as well as convenient to be implemented in the existing computational fluid dynamics codes. The flow over a cylinder with synthetic observations, the free round jet, the flow over a hump, and the three-dimensional flow over a wall-mounted cube, all of which are challenging for original Reynolds-averaged Navier-Stokes simulations, are employed to successfully demonstrate the reliability and capacity of the present ABDA model. The first-order scheme applied to the adjoint equations exhibits little effects on the final assimilation results, but improves the robustness significantly, and drives β to another solution that can also minimize the cost function. The present ABDA model is efficient in the heavy assimilation work of different types of shear and separated flows.