Two porous carbon-based samples doped with Au and Co, respectively, are investigated. The neutron diffraction study reveals an amorphous structure of both samples. The Co-doped sample contains structural clusters with larger size and exhibits a long-range ferromagnetic (FM) ordering at 2.6 K. The NMR investigations demonstrate, that the samples are obtained with a partial carbonization of initial aromatic compounds and do not reach a state of glassy carbon. The magnetization study, as well as investigations of a longitudinal nonlinear response to a weak ac field and electron magnetic resonance, gives evidences for presence of FM clusters in the samples already at temperatures well above 300 K. A short-range character of the FM ordering in the Au-doped sample transforms below T C ≈ 210 K into another inhomogeneous FM state. Besides the FM clusters, this state contains a subsystem with a long-range FM ordering (matrix) formed by paramagnetic centers, existing outside the clusters. The nonlinear response data suggest a percolative character of the long-range FM matrix, which is connected probably with a porous