Answer
The answer is no; Sima Qian did not complete the Records of the Grand Historian during his tenure as Grand Historian. He was imprisoned for defending a general who surrendered to the Xiongnu, forcing him to instead work on the project in secret for over a decade. He eventually finished it in his later years, after he was released from prison.