The intriguing electronic and magnetic properties of fully and partially hydrogenated boron nitride nanoribbons (BNNRs) were investigated by means of first-principles computations. Independent of ribbon width, fully hydrogenated armchair BNNRs are nonmagnetic semiconductors, while the zigzag counterparts are magnetic and metallic. The partially hydrogenated zigzag BNNRs (using hydrogenated BNNRs and pristine BNNRs as building units) exhibit diverse electronic and magnetic properties: they are nonmagnetic semiconductors when the percentage of hydrogenated BNNR blocks is minor, while a semiconductor-->half-metal-->metal transition occurs, accompanied by a nonmagnetic-->magnetic transfer, when the hydrogenated part is dominant. Although the half-metallic property is not robust when the hydrogenation ratio is large, this behavior is sustained for partially hydrogenated zigzag BNNRs with a smaller degree of hydrogenation. Thus, controlling the hydrogenation ratio can precisely modulate the electronic and magnetic properties of zigzag BNNRs, which endows BN nanomaterials many potential applications in the novel integrated functional nanodevices.