An automatic sample preparation apparatus configured to automatically prepare a sample piece (Q) from a sample, comprising: a charged particle beam irradiation optical system 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 configured to hold and transfer the sample piece (Q) separated and extracted from the sample; a sample piece holder-fixing bed configured to hold a sample piece holder (P) to which the sample piece (Q) is transferred by the sample piece transfer device 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 (Q) held by the sample piece transfer device , the charged particle beam irradiation optical system , the sample piece transfer device , and the gas supply portion for transferring the sample piece (Q) to the sample piece holder (P), and the computer is configured to control a movement of the sample piece transfer device or the sample stage to transfer the sample piece (Q) to the sample piece holder (P), 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 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 configured to hold and transfer the sample piece (Q) separated and extracted from the sample; a sample piece holder-fixing bed configured to hold a sample piece holder (P) to which the sample piece (Q) is transferred by the sample piece transfer device 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 (Q) held by the sample piece transfer device , the charged particle beam irradiation optical system , the sample piece transfer device , and the gas supply portion for transferring the sample piece (Q) to the sample piece holder (P), and the computer is configured to control a movement of the sample piece transfer device or the sample stage to transfer the sample piece (Q) to the sample piece holder (P), 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. <EOS>