Encoding methods and apparatuses are provided. The method includes: obtaining to-be-encoded information including K information bits and a mother code length N; determining, based on K and N, a set I corresponding to subchannels of the information bits, where information bits corresponding to subchannel sequence numbers in I are distributed in X outer-code subcodes including X1 first-type outer-code subcodes, quantities of information bits in the X1 first-type outer-code subcodes are P1, P2, . . . , and PX1, Pi (i=1, 2, . . . , X1) is one of K1, K2, . . . , and Km, which are greater than a first threshold LB and less than a second threshold HB, 1=<m <(HB−LB−1), LB+1<HB, HB<=a length B of an outer-code subcode, X, HB, and B are positive integers, and LB is an integer>=0; and performing encoding based on I.