The invention discloses a method and a system for a master device to automatically number slave devices, belonging to the technical field of an optical fiber distribution system. The method comprises the following steps that: S1: the master device broadcasts an order of collecting SN sequence numbers of the slave devices; S2: the slave devices return back own SN sequence number information after random delay time; S3: after collecting the SN sequence number information of all the slave devices, the master device forms a SN sequence number and serial number corresponding list, and sends the list to all the slave devices; S4: after receiving the list, the slave devices respectively contrast own SN sequence numbers according to the SN sequence number and serial number corresponding list, find out corresponding serial numbers and generate own unique serial numbers. By automatically and uniquely numbering the slave devices, a problem of collision caused by reporting communication data by multiple slave devices can be avoided, moreover, the SN sequence number, the specific geographical position and the device serial number information of each slave device are maintained at the master device side, thus, state of multiple slave devices can be monitored accurately, project opening efficiency is improved, and later maintenance of the devices is facilitated.