Optical communication modulation technology and networking technology are two important technologies for constructing free-space optical (FSO) communication. In this paper, pulse width modulation (PWM) is used to realize free-space optical communication. The process of signal modulation and demodulation is implemented by means of a field programmable gate array (FPGA). An optical communication relay system is constructed to realize communication networking. The binary data bits in the communication process are converted into pulse signals of different widths, the data demodulation process is realized by sampling with a high-speed analog-to-digital converter (ADC), the data level is determined by counting the proportion of high and low voltages sampled in a pulse period. The relay system analyzes the routing target after receiving the pulse signal from the transmitter, and then sends the data to the target receiver. The experimental results show that the constructed system can achieve point-to-multipoint free-space optical communication. Additionally, using ADC to demodulate the received signal increases the stability of the free-space optical communication system. This system provides the design prototype system of FSO communication networking technology.