Retention durability, especially in the eye, is one of the most important properties of ophthalmic viscosurgical devices (OVDs) during ocular surgery. However, the information on the physical properties of OVDs is insufficient to explain their retention durability. The purpose of this study is to clarify the mechanism of OVD retention to improve understanding of the behavior of OVDs during ocular surgery. To elucidate the mechanism of OVD retention, we have developed a new test method for measuring repulsive force. As a result, the maximum repulsive force of OVDs was positively and well correlated with the retention durability of investigated OVDs. Consequently, we demonstrated that the repulsive force could be used as an index of retention durability on the ocular surface and in the eye. We directly compared the intraocular retention durability of three OVDs (Shellgan, Viscoat, and Opegan-Hi) in ex vivo porcine eyes. Opegan-Hi was immediately removed from the anterior chamber, but Shellgan and Viscoat remained largely in the anterior chamber as determined by fluorescence imaging. These results showed that the intraocular retention behavior of OVDs was similar to their ocular surface behavior in our previous report, suggesting that retention durability is dependent on the OVD itself. The retention durability of Shellgan seemed to be higher than that of Viscoat, and the maximum repulsive force of Shellgan was 1.35-fold higher than that of Viscoat. Therefore, the repulsive force might be a useful index for assessing the difference in the retention durability between OVDs such as Shellgan and Viscoat.