This article proposes a new estimation and compensation approach to mitigate several linear and widely linear effects in coherent optical systems using digital signal processing (DSP) algorithms. Compared to most of the available strategies that employ local estimation and/or compensation algorithms, this approach performs a global impairments estimation and compensation based on nonlinear least squares. The proposed method estimates and compensates for the chromatic dispersion (CD), carrier frequency offset (CFO), in-phase/quadrature (IQ) imbalance, and laser phase noise in two steps. First, it estimates the quasi-static parameters related to the CD, CFO, and both transmitter and receiver IQ imbalance. Second, it estimates both transmitter and receiver lasers’ phases and compensates for all the imperfections by using a zero-forcing equalizer. Simulations show the effectiveness of the approach in terms of statistical performance and computational time. The estimation performance is assessed by computing the Cramér–Rao lower bound, while the detection performance is compared to a modified clairvoyant equalizer.