BaMgF4:Er3+, Yb3+ nanocrystals in rod-shape are synthesized by means of the reverse co-precipitation. They emit green and red light under excitation of near-infrared light (980 nm). The green and red emissions may be attributed to the 2H11/24I15/2, 4S3/24I15/2 and 4F9/24I15/2 transitions of Er3+. Dopant ions Yb3+ as sensibilizers can improve the upconversion transformation efficiency. The emission intensity is the strongest when the contents of Er3+ and Yb3+ are 3% and 10%, respectively. With increasing concentration of Yb3+, the red emission intensity increases while the green emission reduces. And the conversion fitting curve between the luminous intensity and pump current indicates that the upconversion process of the green and red light of BaMgF4: Er3+, Yb3+ is due to two-photon absorption.