The paper is devoted to a noncommutative holomorphic functional calculus and its application to noncommutative algebraic geometry. A description is given for the noncommutative (infinite-dimensional) affine spaces A(q)(x), 1 <= q <= 8, x = (xi)(i is an element of Xi), and for the projective spaces P-q(n) within Kapranov's model of noncommutative algebraic geometry based on the sheaf of formally-radical holomorphic functions of elements of a nilpotent Lie algebra and on the related functional calculus. The obtained result for q = infinity generalizes Kapranov's formula in the finite dimensional case of A(q)(n). The noncommutative scheme P-q(n) corresponds to the graded universal enveloping algebra U(g(q)(x)) of the free nilpotent Lie algebra of index q generated by x = (x(0),..., x(n)) with deg(x(i)) = 1, 0 <= i <= n. A sheaf construction B(P-n, f(q), O(-2),..., O(-q)) is suggested, in terms of the twisted sheaves O(-2),..., O(-q) on P-n and the formal power series f(q), to restore the coordinate ring of P-q(n) that is reduced to U(g(q)(x)). Finally, the related cohomology groups H-i(P-q(n), O-q(d)), i >= 0, are calculated.