An automatic sample preparation apparatus configured to automatically prepare a sample piece from a sample, comprising: a charged particle beam irradiation optical system (14, 15) configured to perform irradiation with a charged particle beam, wherein the charged particle beam irradiation optical system includes a focused ion irradiation optical system which is configured to provide a focused ion beam and an electron beam irradiation optical system which is configured to provide an electron beam, wherein the charged particle beam is at least one of the focused ion beam and the electron beam; a sample stage configured to move with the sample placed thereon; a sample piece transfer device (18, 19) configured to hold and transfer the sample piece separated and extracted from the sample; a sample piece holder-fixing bed (12a, 34) configured to hold a sample piece holder to which the sample piece is transferred by the sample piece transfer device (18, 19) in operation; a gas supply portion configured to irradiate gas for forming a deposition film with the charged particle beam; and a computer characterized in that the computer is configured to control, based on at least an image which is previously acquired by the computer by use of the charged particle beam with respect to the sample piece held by the sample piece transfer device (18, 19), the charged particle beam irradiation optical system (14, 15), the sample piece transfer device (18, 19), and the gas supply portion for transferring the sample piece to the sample piece holder, and the computer is configured to control a movement of the sample piece transfer device (18, 19) or the sample stage to transfer the sample piece to the sample piece holder, based on positional information which is obtained by template-matching using a template of the sample piece holder by extracting an edge of the sample piece holder from the image acquired by at least one of the focused ion beam and the electron beam. a charged particle beam irradiation optical system (14, 15) configured to perform irradiation with a charged particle beam, wherein the charged particle beam irradiation optical system includes a focused ion irradiation optical system which is configured to provide a focused ion beam and an electron beam irradiation optical system which is configured to provide an electron beam, wherein the charged particle beam is at least one of the focused ion beam and the electron beam; a sample stage configured to move with the sample placed thereon; a sample piece transfer device (18, 19) configured to hold and transfer the sample piece separated and extracted from the sample; a sample piece holder-fixing bed (12a, 34) configured to hold a sample piece holder to which the sample piece is transferred by the sample piece transfer device (18, 19) in operation; a gas supply portion configured to irradiate gas for forming a deposition film with the charged particle beam; and a computer characterized in that the computer is configured to control, based on at least an image which is previously acquired by the computer by use of the charged particle beam with respect to the sample piece held by the sample piece transfer device (18, 19), the charged particle beam irradiation optical system (14, 15), the sample piece transfer device (18, 19), and the gas supply portion for transferring the sample piece to the sample piece holder, and the computer is configured to control a movement of the sample piece transfer device (18, 19) or the sample stage to transfer the sample piece to the sample piece holder, based on positional information which is obtained by template-matching using a template of the sample piece holder by extracting an edge of the sample piece holder from the image acquired by at least one of the focused ion beam and the electron beam.