A magnetic encoder comprising: a magnet portion substantially in a circular ring shape magnetized in mutlipoles in a circumferential direction, and a fixed member fixing the magnet portion, wherein the magnet portion includes a magnetic member and a resin, and the magnet portion and the fixed member are bonded by an adhering agent, which is coated to a face of the fixed member in a semicured state before a curing reaction is progressed to bond the magnet portion to the fixed member, wherein the magnetic member is constituted by a magnet powder, wherein the magnet portion comprises 86 to 92 weight% and 60 to 80 volume% of the magnet powder, wherein the resin is a thermoplastic resin, wherein the magnet portion is formed by a chemical etching treatment, wherein, as a first step, a surface of the fixed member is cleaned by an alkaline degreaser, thereafter, pickled by being dipped in diluted hydrochloric acid or the like at normal temperatures for several minutes, thereafter, dipped in an iron oxalate treatment solution including at least oxalic acid ion and fluorine compound for several minutes to thereby form an iron oxalate film at the surface; and at a second step, a back yoke made of magnetic stainless steel formed with the iron oxalate film is dipped in an aqueous solution or the like of an acid mixed with nitric acid-hydrofluoric acid at normal temperatures for several minutes, a large portion of the iron oxalate film is removed to a level of not invading stainless steel at a matrix thereof, and the surface of the back yoke is formed with chemically etched recesses and projections, to generate further recesses on the bonding surface of the fixed member, baking the adhering agent to the fixed member to achieve a semicured state, and progressing a curing reaction of the adhering agent in a process of forming the magnet portion by insert molding wherein the adhering agent is brought into a completely cured state by the heat of the melted resin and optionally in addition thereto by secondary heating after molding. a magnet portion substantially in a circular ring shape magnetized in mutlipoles in a circumferential direction, and a fixed member fixing the magnet portion, wherein the magnet portion includes a magnetic member and a resin, and the magnet portion and the fixed member are bonded by an adhering agent, which is coated to a face of the fixed member in a semicured state before a curing reaction is progressed to bond the magnet portion to the fixed member, wherein the magnetic member is constituted by a magnet powder, wherein the magnet portion comprises 86 to 92 weight% and 60 to 80 volume% of the magnet powder, wherein the resin is a thermoplastic resin, wherein the magnet portion is formed by a chemical etching treatment, wherein, as a first step, a surface of the fixed member is cleaned by an alkaline degreaser, thereafter, pickled by being dipped in diluted hydrochloric acid or the like at normal temperatures for several minutes, thereafter, dipped in an iron oxalate treatment solution including at least oxalic acid ion and fluorine compound for several minutes to thereby form an iron oxalate film at the surface; and at a second step, a back yoke made of magnetic stainless steel formed with the iron oxalate film is dipped in an aqueous solution or the like of an acid mixed with nitric acid-hydrofluoric acid at normal temperatures for several minutes, a large portion of the iron oxalate film is removed to a level of not invading stainless steel at a matrix thereof, and the surface of the back yoke is formed with chemically etched recesses and projections, to generate further recesses on the bonding surface of the fixed member, baking the adhering agent to the fixed member to achieve a semicured state, and progressing a curing reaction of the adhering agent in a process of forming the magnet portion by insert molding wherein the adhering agent is brought into a completely cured state by the heat of the melted resin and optionally in addition thereto by secondary heating after molding.