The constitutive relation of geological mechanics similar material is the basis of the geological mechanics experiment. It is obtained using stress curves and strain curves from the uniaxial compression test of square specimen. However, the traditional measuring method exhibits a nonignorable error for similar material owing to its boundary effect. An approach based on embedding a bare fiber Bragg grating (FBG) sensor into a specimen is presented for measuring the constitutive relation of the similar material. The error of the traditional approach was examined by simulation, and the results of measurement in different frictions were compared. The simulation result revealed that the error increases with friction when the sensor was pasted on the surface. When the sensor was embedded in the middle of the specimen, the friction was less effective. Two similar FBG sensors were used in the measurement of similar material for verification: one embedded into the specimen and another pasted on the surface. The friction was varied using silicone oil. Experimental results agreed well with the simulation results, indicating that the approach of embedding bare FBG into a specimen can measure the constitutive relation precisely, and it is more accurate than the traditional approach.