The ability of a lens to act as converging or diverging depends upon its refractive index. The refractive index n of the material of a lens depends upon the medium in which the lens is placed. Generally the lens is in air so n gives refractive index of material of lens with respect to air. If you place the convex lens in a medium other than air, then due to change in n, the focal length f of lens changes. if n decreases, f increases.
So if you immerse the convex lens in a liquid whose refractive index is greater than refractive index of material of lens then it will change its nature and become concave lens and thus it will start diverging the rays rather than focusing them on a single point. Its true the other way round also that is concave also becomes convex.