The present invention provides an improved magnetic assembly of a screwdriver head rod. The assembly includes a cylindrical body, available with a trepan boring for sleeving onto the screwdriver head rod. The first end of the cylindrical body is provided with a magnetic body groove. A magnetic body is assembled into the magnetic body groove. At least two flexible locating detents are prefabricated onto the second end of the cylindrical body. The flexible locating detent has a flexible section and locating flange. The locating flange is protruded into the trepan boring of the cylindrical body. It is possible to preserve the components of magnetic assembly, reduce the manufacturing costs, and improve the assembly performance and endurance with better industrial benefits and applicability.