A series of layered CeO$_{1-x}$F$_x$FeAs compounds with x=0 to 0.20 are synthesized by solid state reaction method. Similar to the LaOFeAs, the pure CeOFeAs shows a strong resistivity anomaly near 145 K, which was ascribed to the spin-density-wave instability. F-doping suppresses this instability and leads to the superconducting ground state. Most surprisingly, the superconducting transition temperature could reach as high as 41 K. The very high superconducting transition temperature strongly challenges the classic BCS theory based on the electron-phonon interaction. The very closeness of the superconducting phase to the spin-density-wave instability suggests that the magnetic fluctuations play a key role in the superconducting paring mechanism. The study also reveals that the Ce 4f electrons form local moments and ordered antiferromagnetically below 4 K, which could coexist with superconductivity.