Kant expounds his thoughts on self-consciousness in the section entitled "The Original Synthetic Unity of Apperception," which is a key part of Kant's epistemology and has also been regarded as the most difficult section of the Critique of Pure Reason. It has even been called the enigma of Kant's epistemology.
Li, Z. (2018). Epistemology: self-consciousness, in A new approach to Kant, Dordrecht, Springer, pp. 133-166.
This document is unfortunately not available for download at the moment.