Single-phase medium-entropy alloys (MEAs) with face-centered cubic (fcc) structure exhibit high elongation and toughness but suffer from insufficient strength. In this work, two novel (CrCoNi)Al4 and (CrCoNi)Al4Nb2 MEAs were designed with the aim of introducing precipitation hardening effect and thus improve strength of the alloys. It was revealed that addition of Al alone, only slightly increased the strength, but the elongation decreased severely. Conversely, the combination of Al and Nb can significantly increase strength and maintain acceptable elongation. The Al addition promotes the formation of a disperse distribution of BCC/B2 composite precipitates, however, the large size and incoherent nature of these composite precipitates produce minor hardening response. Except for the BCC/B2 composite precipitates, a high density of the nanoscale γ′ phase with L12 structure and stoichiometry of (Ni, Co, Cr)3(Al, Nb) is produced in the Al4Nb2 MEA, which significantly increases the strength of the alloy. After the addition of Al and Nb, the deformation mechanism of the alloys is changed from nanotwins to stacking fault (SF) dominated plasticity. Such phenomenon mainly relates to the increasing critical twinning stress affected by the channel width of the matrix. This study provides new insight for the composition design of precipitation-hardening MEAs.