Chemical doping has recently become a very important strategy to induce superconductivity especially in complex compounds. Distinguished examples include Ba-doped La$_2$CuO$_4$ (the first high temperature superconductor), K-doped BaBiO$_3$, K-doped C$_{60}$ and Na$_{x}$CoO$_{2}cdot y$H$_{2}$O. The most recent example is F-doped LaFeAsO, which leads to a new class of high temperature superconductors. One notes that all the above dopants are non-magnetic, because magnetic atoms generally break superconducting Cooper pairs. In addition, the doping site was out of the (super)conducting structural unit (layer or framework). Here we report that superconductivity was realized by doping magnetic element cobalt into the (super)conducting-active Fe$_2$As$_2$ layers in LaFe$_{1-x}$Co$_{x}$AsO. At surprisingly small Co-doping level of $x$=0.025, the antiferromagnetic spin-density-wave transition in the parent compound is completely suppressed, and superconductivity with $T_csim $ 10 K emerges. With increasing Co content, $T_c$ shows a maximum of 13 K at $xsim 0.075$, and then drops to below 2 K at $x$=0.15. This result suggests essential differences between previous cuprate superconductor and the present iron-based arsenide one.