The electronic structure and the magnetic properties of the molecule-based ferromagnets Cu[C(CN)3]2 and Mn[C(CN)3]2 are studied according to first principles within density-functional theory (DFT) and the full potential linearized augmented plane wave (FP-LAPW) method. The total energy, atomic spin magnetic moments, and density of states (DOS) of Cu[C(CN)3]2 and Mn[C(CN)3]2 are all calculated. The calculations reveal that the compounds have a stable ferromagnetic ground state and half-metallic properties. The total spin magnetic moment is 1.0μB for Cu[C(CN)3]2 and 5.0μB for Mn[C(CN)3]2 per molecule, the magnetic moment mainly comes from metal atoms, although there is a slight contribution from N and C atoms.