An apparatus for two-dimensional machining, which performs a required two-dimensional work by driving a working spindle in accordance with a two-dimensional locus given by a teaching shaft. An area of action of the teaching shaft and an area of action of the working shaft are at least partly common to each other to achieve space saving and facilitate additional machining.