The invention discloses a method for achieving dynamic spectrum allocation in cognitive radio. According to the method, through an idle spectrum fragment detection technology in cognitive radio, idle fragments, occupied by unauthorized users, on a frequency spectrum segment are detected, discrete idle frequency spectrum fragments are aggregated to form discrete sub-channels in an NC-OFDM system, the NC-OFDM sub-channels are placed into a frequency spectrum pool to form resources, and when users need frequency spectrum, the channel resources in the frequency spectrum pool are distributed to the users who wait for access so that data transmission can be carried out, and the utilization rate of the frequency spectrum is increased. According to the method for achieving dynamic spectrum allocation in cognitive radio, the detected discrete idle frequency spectrum fragments are placed into the frequency spectrum pool to be aggregated, and are distributed through the frequency spectrum pool system. According to the method for achieving dynamic spectrum allocation in cognitive radio, the purposes that the utilization rate of the frequency spectrum is increased, the access time of the cognitive users is shortened, and the frequency of frequency spectrum switching, caused by appearance of the authorized users, of the cognitive users is reduced are achieved.