So let's assume that there exists programming library Lib1 made with language Lang1. If I rewrite this library in language Lang2 and expand with additional features (or scrap few existing), name it MyLib and then release under different license and take copyright to myself (only for MyLib) do I infringe the copyright law?
The answer to this depends very much in which country you are in, and how you go about implementing it.
First of all, this might seem obvious, but copyright only applies if you copy something that is covered under copyright.
If you copy an idea - that having a library that solves problem X is useful - and that is the only aspect you copy, then under U.K. Copyright law, there is no copyright infringement, as ideas are not copyrighted.
However, if you copy aspects of the library interface, or the object model of the original library, then it's a derived work, and the copyright of the new work is only partly yours.
If you translate the source into a new language, then the copyright is largely still with the original author.
Every country implements copyright law in their own way. One of the principle differences are in the available "fair use" clauses. You may find that you are entitled to a fair use clause for creating a "compatible" library, or you may be allowed to quote small aspects of the original in your new work.
You need to check up on your countries laws.
One thing not touched on in other answers: publishing it is irrelevant for copyright infringement. Copying is the infringement (hence copyright) even if you keep the copy in a bottom drawer and never use it or look at it again.
Of course, if you thar your chance of being sued is vanishingly small and even if you were you would have an excellent chance at succeeding in a fair use/dealing defence.
Even if you just publish it (without a license of the copyright holder) you are committing copyright infringement. Whether it's under your own name or not doesn't make much difference.
One of the exclusive rights of the copyright holder is the right to create derivative works. So that's your first point of copyright infringement. If you "take copyright to myself" and I understand this to mean that you claim you are the exclusive copyright holder, that's really bad. That could be fraud. If you want to change the license then I assume there is some license, and most likely you have no right to publish anything under a different license.
Apart from all that, if people get your license, assuming that you are the exclusive copyright holder, and that there is a certain license, and that is not true, you might create an almighty legal mess for everyone.