Could someone give a reference or construct an example of closed subspace of $Y\subset L\_1[0,1]$ such that $\operatorname{dist}(x,Y)$ is not attained of for any $x\notin Y$.


I read somewhere that $Y$ is necessarily of infinite dimension and codimension.



Antiproximanal subspace of $L_1[0,1]$
The $Y$ in Mikhail's answer has codimension one. Obviously $Y$ cannot be reflexive, but $Y$ can be of any non zero finite codimension or of infinite codimension. (Let $Z$ be any separable Banach space and let $Q$ be an operator from $L\_1$ to $Z$ that maps the closed unit ball of $L\_1$ onto the open unit ball of $Z$. The kernel $Y$ of such a quotient map $Q$ is antiproximinal. It is easy to built such an operator from $\ell\_1$ onto $Z$; to get one from $L\_1$ compose the operator from $\ell\_1$ with a norm one projection from $L\_1$ onto a subspace that is isometric to $\ell\_1$.)


