The multi-function flexible shaft grinding machine features a separated power design, which reduces the weight and volume of the handheld part, making it lightweight and flexible for prolonged operation or precision tasks. It effectively reduces operator fatigue. The machine supports the replacement of different operating heads and is compatible with various grinding tools, enabling functions such as grinding, cutting, rough machining, rust removal, milling, brushing, polishing, and engraving. It can be used for pipeline end rust removal and weld seam grinding.