An electronic device and method are disclosed herein. The electronic device includes a sensor and a processor. The processor implements the method, including measuring infrared light corresponding to a user using the sensor, and detecting biometric information of the user if the infrared information satisfies a predetermined condition.