The effective fragment potential (EFP) approach, which can be described as a nonempirical polarizable force field, affords an accurate first-principles treatment of noncovalent interactions in extended systems. EFP can also describe the effect of the environment on the electronic properties (e.g., electronic excitation energies and ionization and electron-attachment energies) of a subsystem via the QM/EFP (quantum mechanics/EFP) polarizable embedding scheme. The original formulation of the method assumes that the system can be separated, without breaking covalent bonds, into closed-shell fragments, such as solvent and solute molecules. Here, we present an extension of the EFP method to macromolecules (mEFP). Several schemes for breaking a large molecule into small fragments described by EFP are presented and benchmarked. We focus on the electronic properties of molecules embedded into a protein environment and consider ionization, electron-attachment, and excitation energies (single-point calculations only). The model systems include chromophores of green and red fluorescent proteins surrounded by several nearby amino acid residues and phenolate bound to the T4 lysozyme. All mEFP schemes show robust performance and accurately reproduce the reference full QM calculations. For further applications of mEFP, we recommend either the scheme in which the peptide is cut along the Cα-C bond, giving rise to one fragment per amino acid, or the scheme with two cuts per amino acid, along the Cα-C and Cα-N bonds. While using these fragmentation schemes, the errors in solvatochromic shifts in electronic energy differences (excitation, ionization, electron detachment, or electron-attachment) do not exceed 0.1 eV. The largest error of QM/mEFP against QM/EFP (no fragmentation of the EFP part) is 0.06 eV (in most cases, the errors are 0.01-0.02 eV). The errors in the QM/molecular mechanics calculations with standard point charges can be as large as 0.3 eV.