Let $\mathbb{F}$ denote a field, and let $V$ denote a vector space over $\mathbb{F}$ with finite positive dimension. A Leonard pair on $V$ is an ordered pair of diagonalizable $\mathbb{F}$-linear maps $A: V \to V$ and $A^* : V \to V$ that each act on an eigenbasis for the other in an irreducible tridiagonal fashion. Let $A,A^*$ denote a Leonard pair on $V$. Let $\{v_i\}_{i=0}^d$ denote an eigenbasis for $A^*$ on which $A$ acts in an irreducible tridiagonal fashion. For $0 \leq i \leq d$, define an $\mathbb{F}$-linear map $E^*_i : V \to V$ such that $E^*_i v_i = v_i$ and $E^*_i v_j = 0$ if $j \neq i$ $(0 \leq j \leq d)$. The map $F = \sum_{i=0}^d E^*_i A E^*_i$ is called the flat part of $A$. The Leonard pair $A,A^*$ is bipartite whenever $F=0$. The Leonard pair $A,A^*$ is said to be near-bipartite whenever the pair $A-F, A^*$ is a Leonard pair on $V$. In this case, the Leonard pair $A-F, A^*$ is bipartite and called the bipartite contraction of $A,A^*$. Let $B,B^*$ denote a bipartite Leonard pair on $V$. By a near-bipartite expansion of $B,B^*$, we mean a near-bipartite Leonard pair on $V$ with bipartite contraction $B,B^*$. In the present paper, we have three goals. Assuming $\mathbb{F}$ is algebraically closed, (i) we classify up to isomorphism the near-bipartite Leonard pairs over $\mathbb{F}$; (ii) for each near-bipartite Leonard pair over $\mathbb{F}$ we describe its bipartite contraction; (iii) for each bipartite Leonard pair over $\mathbb{F}$ we describe its near-bipartite expansions. Our classification (i) is summarized as follows. We identify two families of Leonard pairs, said to have Krawtchouk type and dual $q$-Krawtchouk type. A Leonard pair of dual $q$-Krawtchouk type is said to be reinforced whenever $q^{2i} \neq -1$ for $1 \leq i \leq d-1$. A Leonard pair $A,A^*$ is said to be essentially bipartite whenever the flat part of $A$ is a scalar multiple of the identity. Assuming $\mathbb{F}$ is algebraically closed, we show that a Leonard pair $A,A^*$ over $\mathbb{F}$ with $d \geq 3$ is near-bipartite if and only if at least one of the following holds: (i) $A,A^*$ is essentially bipartite; (ii) $A,A^*$ has reinforced dual $q$-Krawtchouk type; and (iii) $A,A^*$ has Krawtchouk type.