An X-ray imaging apparatus includes: an X-ray sensor configured to convert an X-ray to an image signal a battery configured to supply electric power for driving the X-ray sensor a battery holder configured to detachably hold the battery a lock mechanism configured to lock the battery in a state in which it is attached to the battery holder and a lock releasing mechanism configured to release the lock effected by the lock mechanism, wherein the lock releasing mechanism is configured to release the lock by the lock mechanism through at least two operations performed by the operator.