This article presents an automated strategy to touch the injection site on zebrafish larva skin with the injection pipette tip accurately in the presence of water-depth variation, which is a crucial problem to automate zebrafish larva microinjection. The presented method consists of two parts: adaptive coordinate transformation and curve evolution for edge detection. In the first part, the impact of refraction is taken into consideration. An adaptive calibration method is developed, which enables the coordinate transformation matrix to adapt to the changing water depth. In the second part, the abovementioned calibration result is used to keep the injection pipette tip descending along the desired route. A curve-evolution-based edge detection algorithm is introduced to detect the deformation of larva skin caused by contact with the injection pipette tip. Experimental results demonstrate that high accuracy and success rates are achieved. The effect of uncertainties caused by water-depth variation and the skill requirement in manual manipulation are eliminated. The proposed contact detection strategy can be extended to microinjection for other organisms. Note to Practitioners—As a typical multicellular model organism, the zebrafish has been increasingly used in biological research. For studying drug toxicity and disease models, exogenous substances need to be injected into zebrafish larvae. However, for both manual and automated injection, a fatal problem is that the camera on the microscope only provides 2-D positional information. It is laborious to align the pipette tip with the injection site along the $z$ -axis. Moreover, due to the characteristic of stereomicroscopes, the impact of refraction at the water surface cannot be ignored. In order to address these issues, in this article, we present an adaptive calibration method and an edge detection algorithm for zebrafish larva heart injection to avoid contact failure in practical implementations.