The invention discloses a method for preparing amoxicillin or ampicillin in a full-water-phase through mode. The method includes the steps that a high-concentration penicillin GK or penicillin VK extracting solution is used as a raw material, immobilized penicillin G acylase or penicillin V acylase is used as an enzyme catalyst, a high-concentration 6-APA solution or crystal is obtained through full-water-phase operations such as catalytic cracking, separating, acidization, filtering, chromatography and concentration by nanofiltration, and then the amoxicillin or the ampicillin is synthesized by the solution or crystal and HPGME or phenylglycine methyl ester under the catalytic action of the immobilized penicillin synthetase. According to the method, water-phase reacting is conducted in the whole process, no organic solvent is used, and environmental pollution is reduced; besides, the special immobilized penicillin G acylase and the penicillin V acylase are used for cracking the high-concentration penicillin GK or VK extracting solution, and special macroporous absorption resin is used for separating and cracking products, so that the processing steps are greatly simplified, the production cost is lowered, the product yield is increased, and the industrial production requirement is met.