The self-assembly of functional molecules into uniform nanostructures with innovational properties has attracted extensive research interest. In the present work, the assembly structures and electronic properties of a novel type of truxene derivative, e.g. truxene-porphyrin derivatives, were studied, for the first time, on a highly oriented pyrolytic graphite (HOPG) surface. Scanning tunneling microscopy (STM) images revealed that the truxene-porphyrin compounds could be parallelly arranged into long-ranged lamellar patterns. Density functional theory (DFT) calculations helped explain the assembly mechanisms further. Besides, order distribution of the smaller compound 1T1P in the 1,3,5-tris(10-carboxydecyloxy)-benzene (TCDB) host network was achieved, which is a reflection of the dimensional effect in the host-guest assembly. Furthermore, together with theoretical analyses, scanning tunneling spectroscopy (STS) measurements were conducted to investigate the electronic properties of truxene-porphyrin compounds. Results showed that the metalation of the porphyrin units could have a significant effect on the band gap and the position of the gap center. The study enhances our understanding of the assembly mechanism of truxene derivatives at the molecular level and paves the way towards fabricating truxene-based functional nanodevices.