Oxide-dispersion-strengthened CoCrNi alloys were fabricated via in situ oxidation by adding Ti and Y, and non-in-situ oxidation by direct addition of Ti and Y2O3, referring to as Y-ODS and Y2O3-ODS alloys, respectively. Transmission electron microscopy (TEM) and atom probe tomography (APT) characterizations reveal that both alloys consist of an ultrafine-grained fcc matrix, a high number density of nanoscale Y-Ti-O precipitates and a small number of (Cr0.75Ti0.25)2O3 oxides. However, the nanoscale Y-Ti-O precipitates in the two alloys show distinct phase and microstructure. The Y2O3-ODS alloy contains only incoherent orthorhombic Y2TiO5 nanoprecipitates, but the Y-ODS alloy also contains a high density of fully coherent pyrochlore Y2Ti2O7 nanoprecipitates. The Y-ODS alloy achieves an ultrahigh yield strength of 1660 MPa, which is 320 MPa higher than the Y2O3-ODS one, but maintains the same ductility. Quantitative analysis of the strengthening mechanisms indicates that such large difference in strength is mainly attributed to the presence of coherent Y2Ti2O7 nanoprecipitates in Y-ODS alloy. This study should provide significant insight into the design of ODS high/medium-entropy alloys via in situ oxidation during mechanical alloying and consolidation.