An electronic device detachable from and attachable to a user and a method of determining a temperature in the electronic device are provided. The electronic device includes a housing, a battery mounted in the housing, a coupling member connected to a part of the housing and configured to detachably couple the electronic device to a part of the user's body, a conductive member disposed on one surface of the housing or on one surface of the coupling member and exposed externally, in electrical connection to the battery, a temperature sensor electrically connected to the conductive member, and a circuit electrically connected to the battery, the conductive member, and the temperature sensor, wherein the circuit is configured to monitor a value of a current or a voltage received through the conductive member, and to charge the battery using the current or operate the temperature sensor, based on at least a part of the monitored value.