Military applications require networked multi-UAV system to perform practically, optimally and reliably under changing mission requirements. Lacking the effective control and communication algorithms is impeding the development of multi-UAV systems significantly. In this paper, distributed optimal flocking control and network co-design problem has been investigated for networked multi-UAV system in presence of uncertain harsh environment and unknown dynamics. First, the mathematical interaction between network imperfections and practical wireless network channel performance has been investigate. Then, a novel co-model has been developed for networked multi-UAV combining effects from physical system and network channel model effectively. Then, adopting neuro dynamics programming (NDP) technique and actor-critic-identifier (ACI) design architecture, a novel online finite horizon optimal flocking control and network co-design has been proposed. The developed algorithm cannot merely obtain the distributed optimal co-design within finite time, but also relax the stringent requirement about physical UAV system and network dynamics. In addition, developed novel co-design can satisfy the practical constraints, e.g. transmit power constraint etc. The Lyapunov stability analysis is used to validate the effectiveness of developed scheme. With the proper NN weight update law, proposed co-design can ensure all closed-loop signals and NN weights are uniformly ultimately bounded (UUB). Furthermore, simulation results have been provided to demonstrate the effectiveness of the developed scheme.