Cantilever-based optical interfacial force microscopy (COIFM) was applied to the investigation of the mechanical properties of soft materials to avoid the double-spring effect and snap-to-contact problem associated with atomic force microscopy (AFM). When a force was measured as a function of distance between an oxidized silicon probe and the surface of a soft hydrocarbon film, it increases nonlinearly in the lower force region below ∼10 nN, following the Herzian model with the elastic modulus of ∼50 MPa. Above ∼10 nN, it increases linearly with a small oscillatory sawtooth pattern with amplitude 1-2 nN. The pattern suggests the possible existence of the layered structure within the film. When its internal part of the film was exposed to the probe, the force depends on the distance linearly with an adhesive force of -20 nN. This linear dependence suggests that the adhesive internal material behaved like a linear spring with a spring constant of ∼1 N/m. Constant-force images taken in the repulsive and attractive contact regimes revealed additional features that were not observed in the images taken in the noncontact regime. At some locations, however, contrast inversions were observed between the two contact regimes while the average roughness remained constant. The result suggests that some embedded materials had spring constants different from those of the surrounding material. This study demonstrated that the COIFM is capable of imaging mechanical properties of local structures such as small impurities and domains at the nanometer scale, which is a formidable challenge with conventional AFM methods.