The invention relates to an X-ray imaging apparatus and method of controlling the same. The X-ray imaging apparatus includes an X-ray source, a collimator that adjusts a radiation region of X-rays radiated by the X-ray source and a processor that determines a region of interest (ROI) in an X-ray image, traces a position of an object of interest in the ROI, and controls the collimator so that a region in which the X-rays are radiated is capable of being interlocked with a result of tracing the object of interest.