The invention discloses a device of precisely machining a special shaped pin hole and a machining method and relates to the technical field of machining. A fixed bracket is mounted on the right side of a main shaft of a boring mill, a coil bracket is fixed on the fixed bracket, a magnet exciting coil winds the outer side of the coil bracket, an ultra-magnetostrictive rod is fixedly mounted in the coil bracket, a boring bar is fixed at the right end of the coil bracket, a boring cutter is fixed on the right end portion close to the boring bar, an automatic control system is arranged on the side face of the boring bar. The machining method comprises the following steps: S1, casting a workblank; S2, performing quench aging treatment; S3, clamping the workblank; S4, roughly boring; S5, electrifying the magnet exciting coil; S6, adjusting the boring bar to a position of a piston hole; S7, starting the boring mill to feed a piston along the axial direction of the boring hole; S8, finishing hole boring, and retreating the boring bar; and S9, detecting the dimension of the piston hole. According to the device of precisely machining the special shaped pin hole and the machining method disclosed by the invention, the angle of deflection of the boring bar is conveniently adjusted, the precision of the special shaped hole is high, and the degree of automation is high.