A sheet feeding device in which sheets contained in a sheet container detachably attached to an apparatus main body are fed by a sheet feeder, including a sheet support member provided in the sheet container to vertically move while supporting the sheets, a lifter for raising and lowering the sheet support member, a cam member to lower the sheet feeder to bring it into contact with the sheets when the sheets are sent out and to raise the sheet feeder to an upper initial position on standby, a detector for detecting the height of the sheets according to the position at which the sheet feeder abuts against the sheets, and a controller for controlling the raising and lowering operations of the lifter on the basis of the detection result of the height of the sheets as obtained by the detector to maintain the uppermost surface of the sheets at a predetermined height, in which, when the sheet container is accommodated in the apparatus main body, the raising operation of the cam member is canceled by the sheet container, and the sheet feeder is lowered from the initial position to enable the detector to perform detection.