Binary-Offset-Carrier (BOC) modulation is widely applied in the modernized global navigation satellite system (GNSS). However, ambiguity may be generated in the code tracking loop due to the multiple side-peaks in the BOC autocorrelation function (ACF). Aiming at this problem, an unambiguous tracking method based on optimizing combined correlation function for BOC signals is proposed. This technique set the main-peak of the BOC ACF as the unambiguous target function, then use the least square method to obtain weighted coefficients of combined ACF for BOC signals with multiple different delays. And a new non-coherent discriminator function that the obtained unambiguous correlation function multiplied by the primary ACF of BOC signals is employed to achieve unambiguous tracking. The tracking performance for both sin-phased BOC and cosine-phased BOC signals is analyzed. Simulations show that the proposed method can solve the ambiguity problem for BOC signals completely and maintain good accuracy in the tracking loop.