To prevent indocyanine green (ICG) toxicity during macular hole repair, a surgical technique was designed in which the hole is protected by a viscoelastic material before injecting ICG to stain the internal limiting membrane. The area covered by the viscoelastic material was not stained by ICG. The internal limiting membrane was peeled without difficulty by taking advantage of the ICG stain outlining it. After surgery, all holes closed and the postoperative outcomes were favorable. Only a small amount of residual ICG remained in the macular area. This surgical technique does not interfere with internal limiting membrane peeling and reduces the residual ICG postoperatively.