Does ZFC' prove the axiom of infinity? The following is (basically) an axiom of ZFC:

Axiom of infinity.
There exists a set $X$ such that:
  
  
*
  
*$\emptyset \in X$
  
*$x \in X \rightarrow x \cup \{x\} \in X$.
  

(I say "basically" because technically, the function symbols $x,y \mapsto x \cup y$ and $x \mapsto \{x\}$ aren't part of the signature of ZFC, so you have to rehash these into membership-based language.)
Now define the axiom system ZFC' to be the same ZFC, except that the axiom of infinity is replaced by the axiom of the existence of an NNO ("natural numbers objects".)

Axiom of NNO.
There exists a set $\mathbb{N}$ together with an element $0 \in \mathbb{N}$ and a function $S : \mathbb{N} \rightarrow \mathbb{N}$ such that for all sets $X$ and all $x \in X$ and all functions $f : X \rightarrow X$, there exists a unique function $\varphi : \mathbb{N} \rightarrow X$ such that $\varphi(0) = x$ and for all $n \in \mathbb{N}$, we have $\varphi(S(n)) = f(\varphi(n))$.

Does ZFC' prove the axiom of infinity?
 A: Yes, because what the axiom of infinity really says is that there exsits exists an infinite ordinal (i.e. an infinite transitive set), and so


*

*By the axiom of specification, any natural numbers object $\mathbb N$ has a well-ordering $\leq\subseteq\mathbb N\times\mathbb N$

*By the axiom of replacement, any well-ordered set is isomorphic to an ordinal.


I haven't gone through the proof of 1. and I suspect it may require some playing around with constructing list objects using cartesian homs and power objects, if you wanted to do it categorically; the proof of 2. you can find, e.g. in chapter 1 of Kunen's Set Theory: An Introduction to Independence Proofs.
A: Let me complete Vladimir Sotirov's answer by giving a proof of (i). Note that my proof is via the ZFC' axioms, rather than categorially, since that seems like what you're looking for.

The definition.
For $a, b\in\mathbb{N}$, say that $a< b$ iff there is some set $X$, some element $x\in X$, and some map $f: X\rightarrow X$ such that - if $\varphi$ is the corresponding map guaranteed by the NNO property of $\mathbb{N}$ - we have $\varphi(a)\not=\varphi(S(a))$ but $\varphi(b)=\varphi(S(b))$. 
Informally, if $a<b$ are natural numbers, this inequality is witnessed by the map $f: \mathbb{N}\rightarrow \mathbb{N}$ which sends every natural $<b$ to its successor, but maps $b$ (and all greater naturals) to $b$.

The proof.
Now, we need to prove that this is in fact a well-ordering. This takes a little bit of work. We need to show


*

*(i) $<$ is a linear order, 


and


*

*(ii) $<$ is a well-order, that is, every nonempty subset of $\mathbb{N}$ has a $<$-least element.


To prove (i), let $A$ be the set of naturals $n$ such that $<$ is linearly ordered below $n$. More precisely, $$A=\{n\in\mathbb{N}: \forall k, m\le n(k\le m\mbox{ or }m\le k)\},$$ where "$\le$" is an abbreviation for "$<$ or equal to" as usual. Now, we can prove easily that $0\in A$, and that $n\in A$ implies $S(n)\in A$.
Now consider the map $f: A\rightarrow A: a\mapsto 0$. If $A\not=\mathbb{N}$, this can be extended to many different $\varphi$s satisfying $\varphi\circ S=f\circ\varphi$: for $b\in A$, let $\varphi_b$ send every element of $A$ to $0$, and every element of $\mathbb{N}\setminus A$ to $b$. So we have $\mathbb{N}=A$.
To prove (ii), we use basically the same trick: let $B$ be the set of naturals $n$ such that $<$ is well-ordered below $n$. More precisely, $$B=\{n\in\mathbb{N}: \forall S\subseteq \mathbb{N}_{\le n}(S\not=\emptyset\rightarrow S\mbox{ has a $<$-least element})\},$$ where "$\mathbb{N}_{\le n}$" is an abbreviation for the set of naturals $m$ satisfying $m\le n$. Now again, it's easy to prove that $0\in B$ and that $B$ is closed under successor, so the same trick as above will work. (In fact, we could have done both cases at once! But I think breaking into two pieces is often pedagogically clearer.)
