The interplay between different ordered phases, such as superconducting, charge or spin ordered phases, is of central interest in condensed matter physics. The very recent discovery of superconductivity with a remarkable T$_c$= 26 K in Fe-based oxypnictide La(O$_{1-x}$F$_x$)FeAs is a surprise to the scientific communitycite{Kamihara08}. The pure LaOFeAs itself is not superconducting but shows an anomaly near 150 K in both resistivity and dc magnetic susceptibility. Here we provide combined experimental and theoretical evidences showing that the anomaly is caused by the spin-density-wave (SDW) instability, and electron-doping by F suppresses the SDW instability and recovers the superconductivity. Therefore, the La(O$_{1-x}$F$_x$)FeAs offers an exciting new system showing competing orders in layered compounds.